I follow this quarkus guide : https://quarkus.io/guides/getting-started and everything works fine on my local machine. However when I push my code and launch a jenkins build I got the following error :
11:19:24 [INFO] [jenkins-event-spy] Generated /home/jenkins/workspace/middleware_snapshot_develop-EKIMU4RSDFMZGBZA3XCVKQY7EEXFYGGT2UK5R5N3NP636H36IDJQ#tmp/withMavenc261dc7b/maven-spy-20200505-091643-8556196817679207068499.log
11:19:24 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project mytraindata-quarkus-test: Execution default-deploy of goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy: java.lang.NoSuchMethodError: org.eclipse.aether.spi.connector.ArtifactUpload.getFileTransformer()Lorg/eclipse/aether/transform/FileTransformer;
11:19:24 [ERROR] -----------------------------------------------------
11:19:24 [ERROR] realm = plugin>org.apache.maven.plugins:maven-deploy-plugin:2.8.2
11:19:24 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
11:19:24 [ERROR] urls[0] = file:/root/.m2/repository/org/apache/maven/plugins/maven-deploy-plugin/2.8.2/maven-deploy-plugin-2.8.2.jar
11:19:24 [ERROR] urls[1] = file:/root/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
11:19:24 [ERROR] urls[2] = file:/root/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
11:19:24 [ERROR] urls[3] = file:/root/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
11:19:24 [ERROR] urls[4] = file:/root/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.15/plexus-utils-3.0.15.jar
11:19:24 [ERROR] Number of foreign imports: 1
11:19:24 [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
11:19:24 [ERROR]
11:19:24 [ERROR] -----------------------------------------------------
11:19:24 [ERROR] -> [Help 1]
11:19:24 [ERROR]
11:19:24 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
11:19:24 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
11:19:24 [ERROR]
11:19:24 [ERROR] For more information about the errors and possible solutions, please read the following articles:
11:19:24 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
11:19:24 [ERROR]
11:19:24 [ERROR] After correcting the problems, you can resume the build with the command
11:19:24 [ERROR] mvn <goals> -rf :mytraindata-quarkus-test
Note that I have another quarkus project with the old bom which build fine:
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-bom</artifactId>
<version>1.1.1.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
as opposite of the new one which fails:
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-universe-bom</artifactId>
<version>1.4.1.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
I suspect that the error comes from the new bom.
Here is the configuration :
10:22:57 Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T19:49:05Z)
10:22:57 Maven home: /usr/share/maven
10:22:57 Java version: 1.8.0_171, vendor: Oracle Corporation
10:22:57 Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
10:22:57 Default locale: en, platform encoding: UTF-8
10:22:57 OS name: "linux", version: "3.10.0-957.21.2.el7.x86_64", arch: "amd64", family: "unix"
I ve installed maven 3.5.3 on my local machine and I can successfully build the project.
So I don't know what causes this failure...
Any help ?
Thank you !
The minimum Maven version for newest Quarkus version is 3.6.2. Can you try upgrading to the latest Maven release?
It really looks like Maven failing due to incompatible versions.
Related
I can make Sonar scanner work with OpenJDK 8 but not with OpenJDK 11.
The Maven command used is:
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent verify sonar:sonar -Dsonar.analysis.mode=preview -Dsonar.report.export.path=sonar-report.json -P ci
The build fails with:
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli) on project framework-bio: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar: javax/xml/bind/ValidationEventHandler
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.codehaus.mojo:sonar-maven-plugin:3.4.0.905
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/var/lib/jenkins/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.4.0.905/sonar-maven-plugin-3.4.0.905.jar
[ERROR] urls[1] = file:/var/lib/jenkins/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
[ERROR] urls[2] = file:/var/lib/jenkins/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[3] = file:/var/lib/jenkins/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar
[ERROR] urls[4] = file:/var/lib/jenkins/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.10.0.1189/sonar-scanner-api-2.10.0.1189.jar
[ERROR] urls[5] = file:/var/lib/jenkins/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: javax.xml.bind.ValidationEventHandler
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
Is Sonar Scanner expected to work with JDK 11?
I finally found https://github.com/sonargraph/sonar-sonargraph-integration/issues/14
The issue is coming from SonarQube plugin named sonar-sonargraph-integration.
I uninstalled the plugin from SonarQube server and the issue went away.
docker sonarqube latest version 6.7.1 broke my maven build on java 9:
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli) on project request-work: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar: javax/xml/bind/ValidationEventHandler
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/jenkins/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.4.0.905/sonar-maven-plugin-3.4.0.905.jar
[ERROR] urls[1] = file:/home/jenkins/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
[ERROR] urls[2] = file:/home/jenkins/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[3] = file:/home/jenkins/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar
[ERROR] urls[4] = file:/home/jenkins/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.10.0.1189/sonar-scanner-api-2.10.0.1189.jar
[ERROR] urls[5] = file:/home/jenkins/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : javax.xml.bind.ValidationEventHandler
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
The same configuration on java 8 work perfect.
How to fix it?
On the SonarQube requirements page you can read that SonarQube
only supports Open JDK 8 and Oracle JRE 8. So you need that runtime to run a SonarQube analysis and the SonarQube Website.
The main problem is the current ElasticSearch engine included in the product (support for Java 9 is added in ElasticSearch 6.2,
see also JIRA item SONAR-10574).
You can read for example in this blog that JDK 9 is obselete so
developers need to migrate the code to JDK 10, JDK 11 (later this year) or fallback to JDK 8. See also
this SO question asking for the plans
for the SonarQube 7.x versions, still without an answer. There is a big chance that support for the next Java runtime will be build into
the 7.x version and not in the 6.x versions. You can analyse Java 9 code. See this
SO question for the details.
after upgrading from 3.3.2 to Sonarqube 5.1.2, my maven build for a project that needs to be built with jdk 1.6 is failing with:
build 03-Dec-2015 19:33:10 [INFO] ------------------------------------------------------------------------
build 03-Dec-2015 19:33:10 [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project my_project: Execution default-cli of goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar failed: An API incompatibility was encountered while executing org.codehaus.mojo:sonar-maven-plugin:2.6:sonar: java.lang.UnsupportedClassVersionError: org/sonar/api/utils/SonarException : Unsupported major.minor version 51.0
build 03-Dec-2015 19:33:10 [ERROR] -----------------------------------------------------
build 03-Dec-2015 19:33:10 [ERROR] realm = plugin>org.codehaus.mojo:sonar-maven-plugin:2.6
build 03-Dec-2015 19:33:10 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
build 03-Dec-2015 19:33:10 [ERROR] urls[0] = file:/tmp/org/codehaus/mojo/sonar-maven-plugin/2.6/sonar-maven-plugin-2.6.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[1] = file:/tmp/org/apache/maven/shared/maven-dependency-tree/2.1/maven-dependency-tree-2.1.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[2] = file:/tmp/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[3] = file:/tmp/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[4] = file:/tmp/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[5] = file:/tmp/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[6] = file:/tmp/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[7] = file:/tmp/org/codehaus/plexus/plexus-utils/1.5.5/plexus-utils-1.5.5.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[8] = file:/tmp/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[9] = file:/tmp/org/codehaus/sonar/runner/sonar-runner-api/2.4/sonar-runner-api-2.4.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[10] = file:/tmp/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[11] = file:/tmp/com/google/guava/guava/10.0.1/guava-10.0.1.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[12] = file:/tmp/com/google/code/findbugs/jsr305/2.0.3/jsr305-2.0.3.jar
build 03-Dec-2015 19:33:10 [ERROR] Number of foreign imports: 1
build 03-Dec-2015 19:33:10 [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
build 03-Dec-2015 19:33:10 [ERROR]
build 03-Dec-2015 19:33:10 [ERROR] -----------------------------------------------------
build 03-Dec-2015 19:33:10 [ERROR] -> [Help 1]
seems like a compatibility issue, any ideas?
Pointing to the old sonar it still works fine, pointing to the new one, I get this.
Thanks,
Roberto
As you can read in the "Requirements" page or the "SonarQube 5.0 Upgrade Guide", you need at least Java 7 to run a SonarQube analysis.
You can always build (compile, test, ...etc) your project with Java 6, but then you need to configure your SonarQube analysis to use Java 7 or greater.
SonarQube 5.x requires java 7 to run the server and to run analysis.
It will still analyze projects build with java 6 but you should run the analysis with java 7.
I fell into almost the same problem running my Sonar analysis on Jenkins via maven. At some point a project analysis that worked started to fail while:
SonarQube Server had not changed (version 4.5.6)
Jenkins Job config had not changed (Maven Job configured with JDK 1.7.0.45)
Maven config had not changed
And this is what I got:
org.codehaus.plexus.component.repository.exception.ComponentLookupException: org/sonarsource/scanner/maven/SonarQubeMojo : Unsupported major.minor version 52.0
17:27:29 [ERROR] -----------------------------------------------------
17:27:29 [ERROR] realm = plugin>org.sonarsource.scanner.maven:sonar-maven-plugin:3.1.1
17:27:29 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
17:27:29 [ERROR] urls[0] = file:/c:/tools/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.1.1/sonar-maven-plugin-3.1.1.jar
17:27:29 [ERROR] urls[1] = file:/c:/tools/.m2/repository/org/apache/maven/shared/maven-dependency-tree/2.2/maven-dependency-tree-2.2.jar
17:27:29 [ERROR] urls[2] = file:/c:/tools/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
17:27:29 [ERROR] urls[3] = file:/c:/tools/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
17:27:29 [ERROR] urls[4] = file:/c:/tools/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
17:27:29 [ERROR] urls[5] = file:/c:/tools/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
17:27:29 [ERROR] urls[6] = file:/c:/tools/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar
17:27:29 [ERROR] urls[7] = file:/c:/tools/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.7/sonar-scanner-api-2.7.jar
17:27:29 [ERROR] urls[8] = file:/c:/tools/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
17:27:29 [ERROR] urls[9] = file:/c:/tools/.m2/repository/com/google/code/findbugs/jsr305/2.0.3/jsr305-2.0.3.jar
17:27:29 [ERROR] Number of foreign imports: 1
17:27:29 [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
The issue is caused here by a mismatch of java version between:
Jenkins Job executing with JDK 1.7.x
sonar-maven-plugin version 3.1.1 being compiled with JDK 1.8.x
The version of the plugin was not set explicitly in the pom.xml, so the analysis started to fail when the job took this version of the plugin.
For many reasons, the job JDK could not be upgraded to 1.8, so the version of the sonar-maven-plugin was fixed to 3.0.2.
This is correct, you need java 1.7 version. Make sure you have updated jdk version not the jre.
First verify which env variable to used to pick up jdk version.
javac -version
output:
Picked up _JAVA_OPTIONS: -Xmx512M
javac 1.7.0_80
Go to the command line and follow the below change.
Set JAVA_OPTIONS=C:\Program Files\Java\jdk1.7.0_80
or
Set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_80
set PATH=%JAVA_HOME%\bin;%PATH%
Using lombok 1.16.6 version of lombok. While building (mvn clean install)from command line I am getting this error:
java.lang.ClassNotFoundException: lombok.javac.handlers.HandleHelper
[ERROR] at lombok.core.SpiLoadUtil$1$1.next(SpiLoadUtil.java:114)
[ERROR] at lombok.javac.HandlerLibrary.loadAnnotationHandlers(HandlerLibrary.java:170)
[ERROR] at lombok.javac.HandlerLibrary.load(HandlerLibrary.java:155)
[ERROR] at lombok.javac.JavacTransformer.<init>(JavacTransformer.java:43)
[ERROR] at lombok.javac.apt.Processor.init(Processor.java:86)
[ERROR] at lombok.core.AnnotationProcessor$JavacDescriptor.want(AnnotationProcessor.java:87)
[ERROR] at lombok.core.AnnotationProcessor.init(AnnotationProcessor.java:141)
[ERROR] at lombok.launch.AnnotationProcessorHider$AnnotationProcessor.init(AnnotationProcessor.java:53)
[ERROR] at com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.<init>(JavacProcessingEnvironment.java:500)
[ERROR] at com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.next(JavacProcessingEnvironment.java:597)
[ERROR] at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:690)
[ERROR] at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
[ERROR] at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
[ERROR] at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
[ERROR] at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
[ERROR] at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
[ERROR] at com.sun.tools.javac.main.Main.compile(Main.java:523)
[ERROR] at com.sun.tools.javac.main.Main.compile(Main.java:381)
[ERROR] at com.sun.tools.javac.main.Main.compile(Main.java:370)
[ERROR] at com.sun.tools.javac.main.Main.compile(Main.java:361)
[ERROR] at com.sun.tools.javac.Main.compile(Main.java:56)
[ERROR] at com.sun.tools.javac.Main.main(Main.java:42)
[ERROR] Caused by: java.lang.ClassNotFoundException: lombok.javac.handlers.HandleHelper
[ERROR] at java.lang.ClassLoader.findClass(ClassLoader.java:530)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[ERROR] at lombok.launch.ShadowClassLoader.loadClass(ShadowClassLoader.java:366)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[ERROR] at java.lang.Class.forName0(Native Method)
[ERROR] at java.lang.Class.forName(Class.java:348)
[ERROR] at lombok.core.SpiLoadUtil$1$1.next(SpiLoadUtil.java:111)
$ mvn -v
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T17:27:37+05:30)
Maven home: /usr/share/maven
Java version: 1.8.0_60, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_IN, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-66-generic", arch: "amd64", family: "unix"
It is not giving any error from Intellij idea.
As mentions at https://projectlombok.org/mavenrepo/, you should define the dependency to the lombok with provided scope. as the following example
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.6</version>
<scope>provided</scope>
</dependency>
</dependencies>
I'm creating a local instance for Jenkins and Sonarqube.
After creating project and after configuring the same, I clicked "Build Now".
In the console output I can see that Maven starts to download the required meta data and once that is completed it throws Compilation error "Cannot find symbol" for each of the file in the project.
Maven is also installed installed in my machine and, I tried downloading the project from GIT and ran maven via command prompt it builds successfully. Only if I build via Jenkins I'm getting this issue. Can someone please help me out with this.
Sonar Error
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project XXXXXXX: Execution default-cli of goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar failed: An API incompatibility was encountered while executing org.codehaus.mojo:sonar-maven-plugin:2.6:sonar: java.lang.UnsupportedClassVersionError: org/sonar/api/utils/SonarException : Unsupported major.minor version 51.0
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.codehaus.mojo:sonar-maven-plugin:2.6
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Program%20Files%20(x86)/Jenkins/maven-repositories /1/org/codehaus/mojo/sonar-maven-plugin/2.6/sonar-maven-plugin-2.6.jar
[ERROR] urls[1] = file:/C:/Program%20Files%20(x86)/Jenkins/maven-repositories/1/org/apache/maven/shared/maven-dependency-tree/2.1/maven-dependency-tree-2.1.jar
[ERROR] urls[2] = file:/C:/Program%20Files%20(x86)/Jenkins/maven-repositories/1/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[3] = file:/C:/Program%20Files%20(x86)/Jenkins/maven-repositories/1/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
[ERROR] urls[4] = file:/C:/Program%20Files%20(x86)/Jenkins/maven-repositories/1/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[5] = file:/C:/Program%20Files%20(x86)/Jenkins/maven-repositories/1/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
[ERROR] urls[6] = file:/C:/Program%20Files%20(x86)/Jenkins/maven-repositories/1/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
[ERROR] urls[7] = file:/C:/Program%20Files%20(x86)/Jenkins/maven-repositories/1/org/codehaus/plexus/plexus-utils/1.5.5/plexus-utils-1.5.5.jar
[ERROR] urls[8] = file:/C:/Program%20Files%20(x86)/Jenkins/maven-repositories/1/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[9] = file:/C:/Program%20Files%20(x86)/Jenkins/maven-repositories/1/org/codehaus/sonar/runner/sonar-runner-api/2.4/sonar-runner-api-2.4.jar
[ERROR] urls[10] = file:/C:/Program%20Files%20(x86)/Jenkins/maven-repositories/1/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
[ERROR] urls[11] = file:/C:/Program%20Files%20(x86)/Jenkins/maven-repositories/1/com/google/guava/guava/10.0.1/guava-10.0.1.jar
[ERROR] urls[12] = file:/C:/Program%20Files%20(x86)/Jenkins/maven-repositories/1/com/google/code/findbugs/jsr305/2.0.3/jsr305-2.0.3.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[project>com.XXXX.etl:XXXX:0.0.1-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] -> [Help 1]
Please specify the compilation version of Java. This is the reason why You are facing this issue - UnsupportedClassVersionError
try adding something like this in Your pom.xml
<build>
<plugins>
<!-- START Of Plugins -->
<!-- MAVEN COMPILER PLUGIN -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<!-- END Of Plugins -->
</plugins>
</build>
Here I have used 1.7 jdk. But You can change that if required.
Please let know if it works...
I had the same error. The problem was that Jenkins service was running on JRE, even though JDK was configured in the system properly. To solve it, I had to stop Jenkins service, delete JRE, modify Jenkins XML to point to JDK, and then restart Jenkins service. Only then it worked.