Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Hudson » Maven 3 job not working in windows slave machine
Maven 3 job not working in windows slave machine [message #1413439] Thu, 28 August 2014 14:07 Go to next message
Leslie Palayil is currently offline Leslie PalayilFriend
Messages: 3
Registered: August 2014
Junior Member
I recently upgraded from Hudson 2.2.1 to 3.1.2 (Java is also upgraded to version 1.7). After upgrade, I am not able to execute jobs on remote windows slave machine. The job involves running jBehave selenium test cases on a remote Windows 7 machine, using maven 3.

The issue is that hudson is not able to find correct maven installation.
It is trying to run a dynamically created mvn(some_random_number).bat file which is dynamically created in "C:\users\lpalayil\AppData\Local\Temp\" folder.
It should execute mvn.bat from bundled maven copied to slave machine as part of slave initialization ("C:\software\hudson\slaves\dev-ci\maven\slavebundle\bundled-maven\bin")

I tried setting MAVEN_HOME environment variables to refer to desired folder. I also tried installing a separated maven on the remote slave machine.
But none seems to work.

The same job works perfectly on Hudson V2.2.1. I have also verified that the issue also exists in Hudson 3.2.

Has anybody faced similar issue ?


Please refer the log below...

Started by user anonymous
Building remotely on MySlave
Updating .../svn/myapp/trunk/app/myappAccTest@HEAD revision: HEAD depth:infinity ignoreExternals: false
At revision 3669
no change for .../svn/myapp/trunk/app/myappAccTest since the previous build
[JFROG] Created an Artifactory Maven Extractor Environment with 1 build steps and 1 Maven build steps and aggregated here: 'null'
[JFROG] Set the environment for builder #0 -1390882676 wrapper 794798227 is last true
[INFO] Using bundled Maven 3 installation
[INFO] Checking Maven 3 installation environment
[myappAccTest] $ C:\Users\lpalayil\AppData\Local\Temp\mvn1014094788386700364.bat --help
[INFO] Checking Maven 3 installation version
[myappAccTest] $ C:\Users\lpalayil\AppData\Local\Temp\mvn1014094788386700364.bat --version
[ERROR] Failure: hudson.AbortException: Failed to determine Maven 3 installation version; unexpected exit code: 1, command output: java.lang.Exception: classworlds configuration not specified nor found in the classpath
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

ERROR: Failed to determine Maven 3 installation version; unexpected exit code: 1, command output: java.lang.Exception: classworlds configuration not specified nor found in the classpath
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

Archiving artifacts
[xUnit] [INFO] - Starting to record.
[xUnit] [INFO] - Processing JBehave-3.x
[xUnit] [INFO] - [JBehave-3.x] - No test report file(s) were found with the pattern '**/target/jbehave/*.xml' relative to 'C:\software\hudson\slaves\dev-ci\workspace\myappAccTest' for the testing framework 'JBehave-3.x'. Did you enter a pattern relative to the correct directory? Did you generate the result report(s) for 'JBehave-3.x'?
[xUnit] [ERROR] - No test reports found for the metric 'JBehave' with the resolved pattern '**/target/jbehave/*.xml'. Configuration error?.
[xUnit] [INFO] - Setting the build status to FAILURE
[xUnit] [INFO] - Stopping recording.
[DEBUG] Skipping watched dependency update for build: myappAccTest #29 due to result: FAILURE
Finished: FAILURE



Re: Maven 3 job not working in windows slave machine [message #1413555 is a reply to message #1413439] Thu, 28 August 2014 20:58 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
Are you using Artifactory plugins?

If I remember correctly JFrog guys added some work around to use different maven on Windows than the maven3-plugin bundled to support Artifactory plugin

https://github.com/hudson3-plugins/maven3-support/commit/bcd228b70685400c6c08f96432635e0723d19e24

Looking at these two lines your log seems something is not set correctly.

[JFROG] Created an Artifactory Maven Extractor Environment with 1 build steps and 1 Maven build steps and aggregated here: 'null'
[JFROG] Set the environment for builder #0 -1390882676 wrapper 794798227 is last true


Winston Prakash
Eclipse Hudson team
Re: Maven 3 job not working in windows slave machine [message #1413698 is a reply to message #1413555] Fri, 29 August 2014 07:51 Go to previous messageGo to next message
Leslie Palayil is currently offline Leslie PalayilFriend
Messages: 3
Registered: August 2014
Junior Member
Hi Winston,
After going through the source code you posted above,
I added "maven.executable.win" environment variable in hudson > MySlave > node properties > environment variables with value as "C:\software\hudson\slaves\dev-ci\maven\slavebundle\bundled-maven\bin\mvn.bat", this is the location where hudson maven bundle is created dynamically on the slave machine.
This fixed the issue !!!
Thank you for your help and support Smile
Btw, Is this the best approach to solving the issue, or is there another better documented/recommended way to tackle the issue ?
Re: Maven 3 job not working in windows slave machine [message #1413920 is a reply to message #1413698] Fri, 29 August 2014 19:12 Go to previous message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
Not really, if the env "maven.executable.win" is not set, then it is supposed to fall back to default location (bundled maven). Looks like somewhere else in your Hudson the env "maven.executable.win" is set to some weird location and you have to reset it to the default location

Winston Prakash
Eclipse Hudson team
Previous Topic:unable to update new repository url in hudson jobs
Next Topic:Problem installing 3.2.0 on Ubuntu 14
Goto Forum:
  


Current Time: Thu Apr 25 07:12:28 GMT 2024

Powered by FUDForum. Page generated in 0.03563 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top