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-toolsfor > 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 <javascript:> [mailto: > jenkins...@googlegroups.com <javascript:>] *On Behalf Of *Erik > *Sent:* 17 September 2012 08:44 > *To:* jenkins...@googlegroups.com <javascript:> > *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 <javascript:> 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 > > ************************************************************************************** >