I have a hudson jobs doing the sonar stats for a maven project.
The execution of the sonar plugin fails with the following trace
[workspace] $ /hudson/hudson1/hudson/tools/maven-3.0.4/bin/mvn -f /hudson/hudson1/hudson/jobs/15_20_NX_Core_Quality/workspace/pom.xml -e -B sonar:sonar -Dsonar.jdbc.password= -Dsonar.forceAnalysis=true -Dsonar.login=admin -Dsonar.password=admin -Dsonar.jdbc.driver=net.sourceforge.jtds.jdbc.Driver -Dsonar.jdbc.url=jdbc:jtds:sqlserver://VX16:1433;databaseName=Sonar2;SelectMethod=Cursor ******** -Dsonar.host.url=http://localhost:8080/sonar ******** ********
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] NX Core
[INFO] core-entity
[INFO] core-logic
[INFO] core-ui
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building NX Core 1.22.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0
[INFO]
[INFO] --- sonar-maven-plugin:2.7.1:sonar (default-cli) # core ---
[INFO] User cache: /home/jetty/.sonar/cache
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] NX Core ........................................... FAILURE [1.414s]
[INFO] core-entity ....................................... SKIPPED
[INFO] core-logic ........................................ SKIPPED
[INFO] core-ui ........................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.490s
[INFO] Finished at: Wed Oct 28 14:10:38 CET 2015
[INFO] Final Memory: 14M/303M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.7.1:sonar (default-cli) on project core: Fail to download libraries from server: Status returned by url : 'http://localhost:8080/sonar/batch_bootstrap/index' is invalid : 404 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.7.1:sonar (default-cli) on project core: Fail to download libraries from server
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Fail to download libraries from server
at org.codehaus.mojo.sonar.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:41)
at org.codehaus.mojo.sonar.bootstrap.RunnerBootstrapper.execute(RunnerBootstrapper.java:104)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:135)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.IllegalStateException: Fail to download libraries from server
at org.sonar.runner.impl.Jars.dowloadFiles(Jars.java:94)
at org.sonar.runner.impl.Jars.download(Jars.java:71)
at org.sonar.runner.impl.JarDownloader.download(JarDownloader.java:40)
at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:91)
at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:87)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:87)
at org.sonar.runner.impl.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:83)
at org.sonar.runner.api.EmbeddedRunner.doStart(EmbeddedRunner.java:250)
at org.sonar.runner.api.EmbeddedRunner.start(EmbeddedRunner.java:188)
at org.sonar.runner.api.EmbeddedRunner.start(EmbeddedRunner.java:183)
at org.codehaus.mojo.sonar.bootstrap.RunnerBootstrapper.execute(RunnerBootstrapper.java:77)
... 22 more
Caused by: java.io.IOException: Status returned by url : 'http://localhost:8080/sonar/batch_bootstrap/index' is invalid : 404
at org.sonar.runner.impl.ServerConnection.downloadString(ServerConnection.java:95)
at org.sonar.runner.impl.ServerConnection.tryServerFirst(ServerConnection.java:163)
at org.sonar.runner.impl.ServerConnection.loadString(ServerConnection.java:142)
at org.sonar.runner.impl.Jars.dowloadFiles(Jars.java:79)
... 33 more
[ERROR]
[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/MojoExecutionException
Sonar analysis completed: FAILURE
Finished: FAILURE
The execution of the plugin fails since 8 days, neither the pom, nor the project changed since this point of time.
sonar system specs
System date,Wed Oct 28 14:34:36 CET 2015
JVM Vendor,Oracle Corporation
JVM Name,Java HotSpot(TM) 64-Bit Server VM
JVM Version,23.6-b04
Java Version,1.7.0_10-b18
Java Home,/usr/lib/jvm/jdk1.7.0_10/jre
JIT Compiler,-
Application Server Container,Apache Tomcat/7.0.35
User Name,tomcat7
User TimeZone,Europe/Zurich
OS,Linux / amd64 / 3.2.0-92-generic
Processors,4
System Classpath,/tomcat/tomcat7/bin/bootstrap.jar:/tomcat/tomcat7/bin/tomcat-juli.jar
Boot Classpath,/usr/lib/jvm/jdk1.7.0_10/jre/lib/resources.jar:/usr/lib/jvm/jdk1.7.0_10/jre/lib/rt.jar:/usr/lib/jvm/jdk1.7.0_10/jre/lib/sunrsasign.jar:/usr/lib/jvm/jdk1.7.0_10/jre/lib/jsse.jar:/usr/lib/jvm/jdk1.7.0_10/jre/lib/jce.jar:/usr/lib/jvm/jdk1.7.0_10/jre/lib/charsets.jar:/usr/lib/jvm/jdk1.7.0_10/jre/lib/jfr.jar:/usr/lib/jvm/jdk1.7.0_10/jre/classes
Library Path,/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Server ID,-
Version,3.4.1
Started at,Wed Oct 28 14:09:46 CET 2015
Database,Microsoft SQL Server 10.50.2500
Database URL,jdbc:jtds:sqlserver://VX16:1433/Sonar2
Database Login,sa
Database Driver,jTDS Type 4 JDBC Driver for MS SQL Server and Sybase 1.2.4
Database Driver Class,net.sourceforge.jtds.jdbc.Driver
Database Dialect (Hibernate),mssql (org.sonar.core.persistence.dialect.MsSql$MsSqlDialect)
Hibernate Default Schema,-
External User Authentication,-
Automatic User Creation,-
Allow Users to Sign Up,-
Force Authentication,-
Total Memory,445 MB
Free Memory,219 MB
Max Memory,954 MB
Heap,init = 262973312(256809K) used = 225130168(219853K) committed = 445120512(434688K) max = 954466304(932096K)
Non Heap,init = 24313856(23744K) used = 80584792(78696K) committed = 80805888(78912K) max = 136314880(133120K)
System Load Average (last minute),8.0%
Loaded Classes (currently/total/unloaded),13535 / 13535 / 0
Start Time,2015-10-28T14:09:37.964+0100
Threads (total/peak/daemon),23 / 23 / 21
Checkstyle,1.1
Cobertura,1.1
Findbugs,1.1
JaCoCo,1.1
Java,1.1
PMD,1.1
Squid for Java,1.1
Surefire,1.1
SONAR_HOME,/tomcat/sonar
awt.toolkit,sun.awt.X11.XToolkit
catalina.base,/tomcat/tomcat7
catalina.home,/tomcat/tomcat7
catalina.useNaming,true
common.loader,"${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar"
file.encoding,UTF-8
file.encoding.pkg,sun.io
file.separator,/
java.awt.graphicsenv,sun.awt.X11GraphicsEnvironment
java.awt.headless,true
java.awt.printerjob,sun.print.PSPrinterJob
java.class.path,/tomcat/tomcat7/bin/bootstrap.jar:/tomcat/tomcat7/bin/tomcat-juli.jar
java.class.version,51.0
java.endorsed.dirs,/tomcat/tomcat7/endorsed
java.ext.dirs,/usr/lib/jvm/jdk1.7.0_10/jre/lib/ext:/usr/java/packages/lib/ext
java.home,/usr/lib/jvm/jdk1.7.0_10/jre
java.io.tmpdir,/tmp/tomcat7-tmp
java.library.path,/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
java.naming.factory.initial,org.apache.naming.java.javaURLContextFactory
java.naming.factory.url.pkgs,org.apache.naming
java.runtime.name,Java(TM) SE Runtime Environment
java.runtime.version,1.7.0_10-b18
java.specification.name,Java Platform API Specification
java.specification.vendor,Oracle Corporation
java.specification.version,1.7
java.util.logging.config.file,/tomcat/tomcat7/conf/logging.properties
java.util.logging.manager,org.apache.juli.ClassLoaderLogManager
java.vendor,Oracle Corporation
java.vendor.url,http://java.oracle.com/
java.vendor.url.bug,http://bugreport.sun.com/bugreport/
java.version,1.7.0_10
java.vm.info,mixed mode
java.vm.name,Java HotSpot(TM) 64-Bit Server VM
java.vm.specification.name,Java Virtual Machine Specification
java.vm.specification.vendor,Oracle Corporation
java.vm.specification.version,1.7
java.vm.vendor,Oracle Corporation
java.vm.version,23.6-b04
jruby.management.enabled,true
line.separator,"
"
org.apache.catalina.startup.ContextConfig.jarsToSkip,""
org.apache.catalina.startup.TldConfig.jarsToSkip,""
os.arch,amd64
os.name,Linux
os.version,3.2.0-92-generic
package.access,sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper."""
package.definition,"sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper."
path.separator,:
server.loader,""
shared.loader,""
sun.arch.data.model,64
sun.boot.class.path,/usr/lib/jvm/jdk1.7.0_10/jre/lib/resources.jar:/usr/lib/jvm/jdk1.7.0_10/jre/lib/rt.jar:/usr/lib/jvm/jdk1.7.0_10/jre/lib/sunrsasign.jar:/usr/lib/jvm/jdk1.7.0_10/jre/lib/jsse.jar:/usr/lib/jvm/jdk1.7.0_10/jre/lib/jce.jar:/usr/lib/jvm/jdk1.7.0_10/jre/lib/charsets.jar:/usr/lib/jvm/jdk1.7.0_10/jre/lib/jfr.jar:/usr/lib/jvm/jdk1.7.0_10/jre/classes
sun.boot.library.path,/usr/lib/jvm/jdk1.7.0_10/jre/lib/amd64
sun.cpu.endian,little
sun.cpu.isalist,""
sun.font.fontmanager,sun.awt.X11FontManager
sun.io.unicode.encoding,UnicodeLittle
sun.java.command,org.apache.catalina.startup.Bootstrap start
sun.java.launcher,SUN_STANDARD
sun.jnu.encoding,UTF-8
sun.management.compiler,HotSpot 64-Bit Tiered Compilers
sun.os.patch.level,unknown
tomcat.util.buf.StringCache.byte.enabled,true
tomcat.util.scan.DefaultJarScanner.jarsToSkip,"bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-tribes.jar,jasper.jar,jasper-el.jar,ecj-*.jar,tomcat-api.jar,tomcat-util.jar,tomcat-coyote.jar,tomcat-dbcp.jar,tomcat-jni.jar,tomcat-spdy.jar,tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,tomcat-juli-adapters.jar,catalina-jmx-remote.jar,catalina-ws.jar,tomcat-jdbc.jar,commons-beanutils*.jar,commons-codec*.jar,commons-collections*.jar,commons-dbcp*.jar,commons-digester*.jar,commons-fileupload*.jar,commons-httpclient*.jar,commons-io*.jar,commons-lang*.jar,commons-logging*.jar,commons-math*.jar,commons-pool*.jar,jstl.jar,geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,jmx-tools.jar,jta*.jar,log4j*.jar,mail*.jar,slf4j*.jar,xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,access-bridge.jar,access-bridge-64.jar,dnsns.jar,jaccess.jar,ldapsec.jar,localedata.jar,sunjce_provider.jar,sunmscapi.jar,sunpkcs11.jar,jhall.jar,tools.jar,sunec.jar,zipfs.jar,gnome-java-bridge.jar,pulse-java.jar,apple_provider.jar,AppleScriptEngine.jar,CoreAudio.jar,dns_sd.jar,j3daudio.jar,j3dcore.jar,j3dutils.jar,jai_core.jar,jai_codec.jar,mlibwrapper_jai.jar,MRJToolkit.jar,vecmath.jar,junit.jar,junit-*.jar,ant-launcher.jar"
user.country,US
user.dir,/tomcat/tomcat7
user.home,/home/tomcat7
user.language,en
user.name,tomcat7
user.timezone,Europe/Zurich
Any help is appreciated.
thanks
Too bad 2.7.1 is not back-compatible.
Lock your plugin version to 2.6 in your pom.xml or upgrade your SonarQube
http://docs.sonarqube.org/display/HOME/Frequently+Asked+Questions
You're using a very very old version of SonarQube. I highly recommend you to upgrade. If you still want to remain on your version of SonarQube, you can try to downgrade sonar-maven-plugin to version 2.6.
I use Eclipse to run my Spark code and use tool Maven in Eclipse to build the dependencies.
Currently I have the situation, when I have to run my code not from Eclipse platform, but from console (bash). I upload and install Maven local on my machine and was playing with the different simple examples. My Maven folder is in Downloads repository. All standard examples are going very well, I have got a right output. All introductions I have found on this site.
Now I want also execute a spark code. After I have placed my Java file with the spark code in the directory, where I have other files, and updated pom.xml, I couldn't build my jar file. I have got the next error:
user#user-HP-ProBook-6570b:~/spark-1.4.0-bin-hadoop2.6/apache-maven-3.3.3/my-app$ mvn package -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Test 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) # CTI ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/user/spark-1.4.0-bin-hadoop2.6/apache-maven-3.3.3/my-app/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) # CTI ---
[INFO] Compiling 1 source file to /home/user/spark-1.4.0-bin-hadoop2.6/apache-maven-3.3.3/my-app/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.728s
[INFO] Finished at: Mon Oct 26 15:18:52 CET 2015
[INFO] Final Memory: 14M/167M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project CTI: Compilation failure
[ERROR] /home/user/spark-1.4.0-bin-hadoop2.6/apache-maven-3.3.3/my-app/src/main/java/app/SimpleApp.java:[12,11] error: generics are not supported in -source 1.3
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project CTI: Compilation failure
/home/user/spark-1.4.0-bin-hadoop2.6/apache-maven-3.3.3/my-app/src/main/java/app/SimpleApp.java:[12,11] error: generics are not supported in -source 1.3
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
/home/user/spark-1.4.0-bin-hadoop2.6/apache-maven-3.3.3/my-app/src/main/java/app/SimpleApp.java:[12,11] error: generics are not supported in -source 1.3
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:516)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
[ERROR]
[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/MojoFailureException
How I understand, is everything wrong with my Spark version. I use currently spark 1.4.0 version. I also post my pom.xml file:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Prototype</groupId>
<artifactId>CTI</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Test</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency> <!-- Spark dependency -->
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>1.4.0</version>
</dependency>
</dependencies>
</project>
Regarding the documentation in the link at the bottom of error message it is not a error of maven, but something wrong is with plugin.
According to you error log, you need to set your java compiler version in maven to the corresponding java version you are using (1.7 or 1.8). It seems that your maven is using a old version of Java (1.3)
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
This is the line that gave the error up :
spark-1.4.0-bin-hadoop2.6/apache-maven-3.3.3/my-app/src/main/java/app/SimpleApp.java:[12,11] error: generics are not supported in -source 1.3
Please notice the second question in the end of this one!
I have got some trouble using Jenkins, the maven-release-plugin and integrity (using MKS) as source code Management (scm).
Well, I try to release my project from MKS via Jenkins to Sonartype Nexus. If I use "deploy" as maven goal within the maven-release-plugin, everything is fine and the release is deployed correct, BUT it is saved as a snapshot in Nexus.
To avoid this snapshot problem I decided to use the maven-release-plugin with release:perform. It should change the version number to a version without snapshot (like: 1.0.0), release it and add snapshot to the version number back again when the release was done. Version is increased also (like 1.0.1-SNAPSHOT).
But if I use "release:prepare" or "release:perform" as maven goals the output tells me:
[ERROR] No SCM URL was provided to perform the release from
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.405s
[INFO] Finished at: Fri Feb 14 11:56:40 CET 2014
[INFO] Final Memory: 10M/245M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:perform (default-cli) on project javatests-test04: No SCM URL was provided to perform the release from -> [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/MojoFailureException
After I searched a now for a long time but did not found the answer I needed I came up with the idea to open this new question.
I tried things like:
adding information to pom.xml but not even sure if maven realized it (did not know what the correct URL would be for me was or if I even have one so I didn't changed it)
original from this site:
<scm>
<connection>scm:git:git#github.com:user/project.git</connection>
<url>scm:git:git#github.com:user/project.git</url>
<developerConnection>scm:git:git#github.com:user/project.git</developerConnection>
</scm>
my version:
<scm>
<connection>scm:integrity|myUser#myServer:7001|#p=d:/MKS/Tools/Tools.pj#s=Tests/Tests.pj#javatests-test04 </connection>
<url>scm:git:git#github.com:user/project.git</url>
<developerConnection>scm:integrity|myUser#myServer:7001|#p=d:/MKS/Tools/Tools.pj#s=Tests/Tests.pj#javatests-test04</developerConnection>
</scm>
I changed the maven goal as a second try(same with -Dproject.scm.developerConnerction):
release:perform -DconnectionUrl=scm:integrity:myUser#myMksServer:7001|#p=d:/MKS/Tools/Tools.pj#s=Tests/Tests.pj#javatests-test04
but it leads to a new error:
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-release-plugin:2.0:prepare
(default-cli) on project javatests-test04: The provider given in the
SCM URL could not be found: No such provider: 'integrity'.
I fact it works fine with "deploy" as maven goal, I am sure this is not the fault of wrong paths to project or to Sonartype Nexus.
Can anybody help me and/or tell me what my Maven goal should be like?
Do I have th change things in the pom? in the master pom? I want the release statement work...
I found a workaround that worked for me:
The plugin genreates some environment variables. Most of them are given and created automatic and one (IS_M2RELEASEBUILD) is editable in in the advanced settings of the option point "maven release build"
My solution:
1.) Check the "Maven release build" in the build environment to gain access to some values later.
2.) Create a "Conditional Step (Single)" as a Pre Step AND as a Post Step
2.1) Both should have a Boolean condition with a token: ${ENV,var="IS_M2RELEASEBUILD"}
2.2) Both should have "call Maven goal" as build step.
Goal for the pre step: *versions:set -DnewVersion=${MVN_RELEASE_VERSION}*
Goal for the post step: *versions:set -DnewVersion=${MVN_DEV_VERSION}*
The value of this variables are the same you enter when a release build is started.
3.) As "normal" build step i simple call a maven goal with "compile"
4.) Add Post-Build-Action: Integrity - CM Checkin with path to your MKS project and other options that are maybe needed here.
5.) Finished! (Dont forget to set your Distribution options in your pom.xml to tell Jenkins and Maven where the release results should be saved)
EDIT: I FOUND A WORKAROUND! SEE ANSWEAR WITH SOLUTION!
Okay, i have done 1 step in the right direction!
Just needed to add a reference into the pom.xml of my project to the currently used maven-release-plugin:
<build>
<plugins>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<checkModificationExcludes>
<checkModificationExclude>**/*pom.xml*</checkModificationExclude>
<checkModificationExclude>**/*.log</checkModificationExclude>
<checkModificationExclude>**/*.jar</checkModificationExclude>
<checkModificationExclude>**/target/**</checkModificationExclude>
</checkModificationExcludes>
</configuration>
</plugin>
</plugins>
</build>
BUT:
Now i have some other problems:
Console tells me that the login to MKS fails. The called user has got read AND write permissions, path to project and to Jenkins server are set right. I also made sure that the MKS folder is first in my path envionment variables. Just for your information: of course i used a real user with real password and real server and not "myUser", "myPassword" or "myServer"
I am pretty sure that i use the right configurations for my scm (developer-)connetction settings, because before the release takes part i download the projects content from MKS to my server with success! No error comes up here...
Usage of "scm:validate" tells me:
[INFO] --- maven-scm-plugin:1.9:validate (default-cli) # javatests-test04 ---
[INFO] MKS Integrity API Version: 4.10
[INFO] connectionUrl scm connection string is valid.
[INFO] MKS Integrity API Version: 4.10
[INFO] project.scm.connection scm connection string is valid.
[INFO] MKS Integrity API Version: 4.10
[INFO] project.scm.developerConnection scm connection string is valid.
What could be the reason for connections failures?
Console:
[...some more console output...]
Executing Maven: -B -f (pathToProject)\workspace\pom.xml -DdevelopmentVersion=0.0.5-SNAPSHOT -DreleaseVersion=0.0.4 -Dusername=myUser -Dresume=false compile release:prepare -Dpassword=**********
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building my test project 0.0.4-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-release-plugin:2.4.1:prepare (default-cli) # javatests-test04 ---
[some other debug infos]
[DEBUG] -- end configuration --
[DEBUG] User/Password information supplied: myUser/myPasswort
[DEBUG] Host/Port information supplied: myServer:7001
[INFO] MKS Integrity API Version: 4.10
[DEBUG] Configuration Path: #p=d:/MKS/Tools/Tools.pj#s=Tests/Tests.pj#javatests-test04
[INFO] Verifying that there are no local modifications...
[INFO] ignoring changes on: **\release.properties, **\pom.xml.next, **\*pom.xml*, **\*.jar, **\pom.xml.releaseBackup, **\pom.xml.backup, **\pom.xml.branch, **\target\**, **\pom.xml.tag, **\*.log
[DEBUG] User/Password information supplied: myUser/myPasswort
[DEBUG] Host/Port information supplied: myServer:7001
[INFO] MKS Integrity API Version: 4.10
[DEBUG] Configuration Path: #p=d:/MKS/Tools/Tools.pj#s=Tests/Tests.pj#javatests-test04
[INFO] Attempting to connect with the MKS Integrity Server
[INFO] Creating session for myUser/***********
[INFO] Attempting to establish connection using myUser#myServer:7001
com.mks.connect.BlimpException: Attempt to launch MKS Integrity Client Timed out. To solve this please try the following:
- Verify that the user you are logged in as has read and write permissions to the Integrity Client install directory.
- Make sure the Integrity Client install directory is the very first entry in the path.
at com.mks.connect.ClientCmdRunnerImpl.icInitialize(Native Method)
at com.mks.connect.ClientCmdRunnerImpl.checkIntegrityClientForLaunch(ClientCmdRunnerImpl.java:71)
at com.mks.connect.ClientCmdRunnerImpl.executePreCondition(ClientCmdRunnerImpl.java:95)
at com.mks.connect.AbstractCmdRunner.executeCommand(AbstractCmdRunner.java:235)
at com.mks.connect.AbstractCmdRunner.execute(AbstractCmdRunner.java:394)
at org.apache.maven.scm.provider.integrity.APISession.connect(APISession.java:134)
at org.apache.maven.scm.provider.integrity.command.login.IntegrityLoginCommand.executeLoginCommand(IntegrityLoginCommand.java:66)
at org.apache.maven.scm.command.login.AbstractLoginCommand.executeCommand(AbstractLoginCommand.java:45)
at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:59)
at org.apache.maven.scm.provider.integrity.IntegrityScmProvider.login(IntegrityScmProvider.java:182)
at org.apache.maven.scm.provider.AbstractScmProvider.login(AbstractScmProvider.java:742)
at org.apache.maven.scm.provider.AbstractScmProvider.status(AbstractScmProvider.java:784)
at org.apache.maven.shared.release.phase.ScmCheckModificationsPhase.execute(ScmCheckModificationsPhase.java:126)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:234)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:169)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:146)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:107)
at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:277)
at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:232)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:178)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
[ERROR] MKS API Exception: Attempt to launch MKS Integrity Client Timed out. To solve this please try the following:
- Verify that the user you are logged in as has read and write permissions to the Integrity Client install directory.
- Make sure the Integrity Client install directory is the very first entry in the path.
[INFO] exited with return code -1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 39.694s
[INFO] Finished at: Mon Feb 17 16:49:07 CET 2014
[INFO] Final Memory: 17M/310M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.4.1:prepare (default-cli) on project javatests-test04: An error occurred during the status check process: Can't login.
[ERROR] Exit Code: -1
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.4.1:prepare (default-cli) on project javatests-test04: An error occurred during the status check process: Can't login.
Exit Code: -1
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:178)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.maven.plugin.MojoExecutionException: An error occurred during the status check process: Can't login.
Exit Code: -1
at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:281)
at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:232)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 30 more
Caused by: org.apache.maven.shared.release.ReleaseExecutionException: An error occurred during the status check process: Can't login.
Exit Code: -1
at org.apache.maven.shared.release.phase.ScmCheckModificationsPhase.execute(ScmCheckModificationsPhase.java:131)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:234)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:169)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:146)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:107)
at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:277)
... 33 more
Caused by: org.apache.maven.scm.ScmException: Can't login.
Exit Code: -1
at org.apache.maven.scm.provider.AbstractScmProvider.login(AbstractScmProvider.java:746)
at org.apache.maven.scm.provider.AbstractScmProvider.status(AbstractScmProvider.java:784)
at org.apache.maven.shared.release.phase.ScmCheckModificationsPhase.execute(ScmCheckModificationsPhase.java:126)
... 38 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[JENKINS] Archiving pathToWorkspace\workspace\pom.xml to pathToRepository/javatests-test04/0.0.4-SNAPSHOT/javatests-test04-0.0.4-SNAPSHOT.pom
[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/MojoExecutionException
channel stopped
Finished: FAILURE
Thanks for your Help! :)