Error invoking maven 3 on hudson 1.395

39 views
Skip to first unread message

timr_84

unread,
Jan 31, 2011, 6:39:30 PM1/31/11
to Hudson Users
Hi

I have been trying to invoke a maven 3.0.2 build on a remote slave
machine (MAC OSX) and keep getting the following error:

ERROR: Processing failed due to a bug in the code. Please report this
to hudson...@googlegroups.com
java.lang.IllegalArgumentException: mavenHome must exists
at
hudson.maven.MavenEmbedderUtils.buildClassRealm(MavenEmbedderUtils.java:
74)...

I can see from the slave connection that MAVEN_HOME and M2 environment
variables are correct, and have confirmed the variables via the hudson
remote console. We can run mvn3 locally on the slave machine.

any ideas would be appreciated.

timr_84

unread,
Feb 1, 2011, 11:23:54 AM2/1/11
to Hudson Users
OK, so the error was in the slave node's Maven Tool Location
definition - the tool was located within the user's directories and it
used $HOME to prefix it. Replacing $HOME with the full path name fixed
the issue.

Kohsuke Kawaguchi

unread,
Feb 1, 2011, 10:06:44 PM2/1/11
to Jenkins Users, timr_84

Thanks. But the error message looks rather poor, and we should improve that.

If you can file an issue for this on http://issues.jenkins-ci.org/ that
would be great.


--
Kohsuke Kawaguchi | CloudBees, Inc. | http://cloudbees.com/

MikeyB

unread,
Mar 29, 2011, 6:21:12 AM3/29/11
to jenkins...@googlegroups.com
Hi,

I am having a similar problem. I am using a master on Linux to run a slave
on Windows and getting this error (stack-trace truncated for clarity):

ERROR: Processing failed due to a bug in the code. Please report this to

[email address removed]


java.lang.IllegalArgumentException: mavenHome must exists
at
hudson.maven.MavenEmbedderUtils.buildClassRealm(MavenEmbedderUtils.java:74)

at
hudson.maven.MavenEmbedderUtils.getMavenVersion(MavenEmbedderUtils.java:170)
at hudson.maven.MavenVersionCallable.call(MavenVersionCallable.java:56)
at hudson.maven.MavenVersionCallable.call(MavenVersionCallable.java:40)
at hudson.remoting.UserRequest.perform(UserRequest.java:114)

The slave machine has Maven 3.0.1 installed and the environment variables
set as follows: M2_HOME=C:\maven M2=%M2_HOME%\bin (these are the correct
locations). The slave connects to the master OK and the node is visible
(with the environment variables as described above) in the master's Hudson
dashboard. However, when I attempt to run the tests I get the above error.
What am I missing? I don't really understand timr's answer above - I have
tried changing the "maven.home default" value in $M2\m2.conf from
"${user.home}/m2" to an absolute path but this seemed to have no effect so
I'm guessing this is not what he meant.

I'd be grateful for any assistance/advice.

--
View this message in context: http://jenkins.361315.n4.nabble.com/Error-invoking-maven-3-on-hudson-1-395-tp3250189p3414353.html
Sent from the Jenkins users mailing list archive at Nabble.com.

Olivier Lamy

unread,
Mar 29, 2011, 6:46:07 AM3/29/11
to jenkins...@googlegroups.com
Hello,
Can you configure a maven installation for this node and use it for your build ?

--
Olivier Lamy
http://twitter.com/olamy
http://www.linkedin.com/in/olamy

2011/3/29 MikeyB <michael...@nokia.com>:

michael...@nokia.com

unread,
Mar 29, 2011, 9:05:37 AM3/29/11
to jenkins...@googlegroups.com
Hi Oliver,

Thanks for your swift response and sorry for my late reply - I've been trapped in meetings. I can run a Maven 'clean package' locally on the node - I get errors in the tests (which I will resolve separately) but they do, at least, run.

I have made a little progress since I posted by changes to the maven config of the node which I have made through the Jenkins console. I've now graduated to a POM failure caused by a 'NoClassDefFoundError' which suggests to me that Maven is now trying to run on the node. I am investigating the classpath issue now but I think that's something separate to my original problem.

Regards

Mike
________________________________________
From: jenkins...@googlegroups.com [jenkins...@googlegroups.com] on behalf of ext Olivier Lamy [olive...@gmail.com]
Sent: 29 March 2011 11:46
To: jenkins...@googlegroups.com
Subject: Re: Error invoking maven 3 on hudson 1.395

Reply all
Reply to author
Forward
0 new messages