Clover/Bamboo - java 1.8 issues (linux vs windows)

I'm having issues tracking down a curious problem with clover & bamboo.  

1) I setup a project in bamboo to run mvn clean test

2) After a successful run I then modified my plan to add the Clover support

3) Clover support failed - I looked at the logs to see what it was trying to do and found the command line:

 /opt/software/apache-maven-3.2.3/bin/mvn -X clean com.atlassian.maven.plugins::maven-clover2-plugin:setup verify com.atlassian.maven.plugins::maven-clover2-plugin:aggregate com.atlassian.maven.plugins::maven-clover2-plugin:clover -Dmaven.clover.generateJson=false -Dmaven.clover.licenseLocation=/var/lib/bamboo/bamboo-home/xml-data/build-dir/DJ-DM-JOB1/.clover/clover.license

 

So this command (or an equivilent command) runs fine on windows.  On Linux i'm getting an error with lambda which implies to me its not using the correct JDK 1.8 -> but when I ran without clover everything was fine.  

[ERROR] /var/lib/bamboo/bamboo-home/xml-data/build-dir/DJ-DM-JOB1/disJockeyClient/target/clover/src-instrumented/infr/audio/gui/impl/BogusRadioUi.java:[220,-1]
1. ERROR in /var/lib/bamboo/bamboo-home/xml-data/build-dir/DJ-DM-JOB1/disJockeyClient/target/clover/src-instrumented/infr/audio/gui/impl/BogusRadioUi.java (at line 220)
__CLR4_0_13un3uni0schsyi.R.inc(5057);frequencyIds.forEach(__CLR4_0_13un3uni0schsyi.lambdaInc(5058,frequencyId -> frequencyIdOptions.add(frequencyId),5059));
^^^^^^^
The method forEach(Object) is undefined for the type Collection<FrequencyId>

 

Any suggestions as to two to get this working on linux?

2 answers

This widget could not be displayed.

Hi Jeff. This is a very interesting case. Could you tell me what exact versions of Java do you use on Linux and Windows?

This widget could not be displayed.

A workaround to make your code compile-able is to disable instrumentation of expression-like lambda functions. Use the instrumentLambda=block or instrumentLambda=none. https://docs.atlassian.com/maven-clover2-plugin/latest/setup-mojo.html#instrumentLambda

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

207 views 3 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you