Hi Erik, Does the slave machine have MAVEN_HOME set in is environment (either in the OS or on the Jenkins slave properties)?
Any chance of a log output of a release build with debug logging ( add the "-X" flag on the release goals ), and a copy of the maven-release-plugin configuration you are using. /James From: jenkinsci-users@googlegroups.com [mailto:jenkinsci-users@googlegroups.com] On Behalf Of erik petzold Sent: 19 September 2012 15:02 To: jenkinsci-users@googlegroups.com Subject: Re: Problem with MAVEN_HOME in a build Hi, we have the maven version set in jenkins main config (only maven 2.2.1, nothing else). We only use maven2 jobs in jenkins and it is the m2-release-plugin (I didnt even know theres another release plugin). When we started with jenkins, the maven version on this machine was older, so someone installed 2.2.1 (we needed this for a maven plugin, cant remember which one). All jobs in jenkins use this version. But the older one is still there, so when calling maven in a job we always provide the -gs flag with the correct global settings.xml. I did this also in the configuration for the release-plugin in the configuration of the job. Maybe it has to do something with this? Erik Am 19.09.2012 14:40 schrieb "mpapo - Michaël Pailloncy" <mpapo....@gmail.com<mailto:mpapo....@gmail.com>>: Hi James, In my case, the problem occurs even if we set a specific version of Maven in build and release configuration. We have 2 Maven versions configured in Jenkins configuration (Maven 2.2.1 and 3.0.3). I guess my configuration is very specific : the problem occurs with a Maven type jobs with Release Plugin and not the normal M2Release Plugin for this type of jobs. @Erik : do you have the same configuration ? We have not detected the problem with Freestyle job type and Release Plugin. Michaël Le mercredi 19 septembre 2012 14:43:21 UTC+2, teilo a écrit : Hi Erik, I personally wouldn't recommend putting MAVEN_HOME in a profile, rather it is better to let Jenkins managed this by specifying the version of maven to use. You can configure this in the Jenkins main config (and then override per slave if needs be.) See http://my.safaribooksonline.com/book/software-engineering-and-development/ide/9781449311155/configuring-your-jenkins-server/sect-configuration-build-tools for more details. BTW - is this with the "m2release plugin" on a maven type job or with the "release plugin" on a freestyle job? /James From: jenkins...@googlegroups.com<mailto:jenkins...@googlegroups.com> [mailto:jenkins...@googlegroups.com]<mailto:[mailto:jenkins...@googlegroups.com]> On Behalf Of Erik Sent: 17 September 2012 08:44 To: jenkins...@googlegroups.com<mailto:jenkins...@googlegroups.com> Subject: Re: Problem with MAVEN_HOME in a build I get the same exception in Jenkins v. 1.477 and maven 2.2.1 Everything works fine, except for the release. There I get this exception. [INFO] Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/classworlds/Launcher [INFO] Caused by: java.lang.ClassNotFoundException: org.codehaus.classworlds.Launcher Thanks, Erik Am Donnerstag, 6. September 2012 19:14:13 UTC+2 schrieb mpapo - Michaël Pailloncy: Hi, We faced in a problem with Maven during a release build. The job is configured with the Release Plugin. MAVEN_HOME variable is correctly set during the first build (and any 'normals' builds), but when we launch a release and the build arrive to the command 'mvn .. release:clean release:prepare release:perform' to launch the Maven3 release, it seems that the MAVEN_HOME variable is not set correctly and the build crashs with this error : class not found: org.codehaus.classworlds.Launcher - org.codehaus.classworlds.Launcher We have also Maven2.2.1 and Maven3.0.3 installed on the master (AIX) which build this job. In .profile file, M2_HOME is by default set to Maven2.2.1. The problem is appeared since we have updated Jenkins with version 1.478. The same job worked correctly before the update (last release has been built just before our update of Jenkins and the mvn command worked correctly). Is this a bug ? Does I create a ticket in Jira ? Thanks in advance from any help ! Michaël ________________________________ ************************************************************************************** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postm...@nds.com<mailto:postm...@nds.com> and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ************************************************************************************** ________________________________ ************************************************************************************** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 **************************************************************************************