pre-build maven step not working with default maven?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

pre-build maven step not working with default maven?

frankgrimes97
Hi All,

I'm running Jenkins 1.515 and have Maven installed through Jenkins (and not available system-wide).
When I try to configure a pre-build step to "Invoke top-level Maven targets" using the default maven version, I get the following error:

java.io.IOException: Cannot run program "mvn" (in directory "/var/lib/jenkins/workspace/<project>"): error=2, No such file or directory
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
	at hudson.Proc$LocalProc.<init>(Proc.java:244)
	at hudson.Proc$LocalProc.<init>(Proc.java:216)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:763)
	at hudson.Launcher$ProcStarter.start(Launcher.java:353)
	at hudson.Launcher$ProcStarter.join(Launcher.java:360)
	at hudson.tasks.Maven.perform(Maven.java:327)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:829)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:626)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
	at hudson.model.Run.execute(Run.java:1575)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:486)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:241)
Caused by: java.io.IOException: error=2, No such file or directory
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
	at java.lang.ProcessImpl.start(ProcessImpl.java:130)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1021)


If I explicitly set the Maven version it works and picks it up from /var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/<maven-version>

Am I misunderstanding what the default option should mean? i.e. does it mean system-wide version?
Or is this a bug?

Thanks,

Frank Grimes

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

pre-build maven step not working with default maven?

James Nord
https://issues.jenkins-ci.org/browse/JENKINS-755

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.