New user issues

770 views
Skip to first unread message

dbo3587

unread,
Jul 19, 2011, 1:17:36 PM7/19/11
to Jenkins Users
Hi there,

I am a brand new user that is having some issues with getting Jenkins
set up. I am basically following the walkthrough provided in Jenkins
book by O'Reilly. Anyway, i try to their very basic build and i keep
getting the error listed below. From what i can tell its trying to run
mvn.bat but cannot find it, however i entered the MAVEN_HOME path
where the mvn.bat file resides...is there something i am missing?


no change for svn://localhost/gameoflife/trunk since the previous
build
[workspace] $ mvn.bat clean package
The system cannot find the file specified
FATAL: command execution failed
java.io.IOException: Cannot run program "mvn.bat" (in directory "C:
\Program Files\Jenkins\jobs\game-of-life-default\workspace"):
CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:698)
at hudson.Launcher$ProcStarter.start(Launcher.java:329)
at hudson.Launcher$ProcStarter.join(Launcher.java:336)
at hudson.tasks.Maven.perform(Maven.java:259)
at hudson.tasks.BuildStepMonitor
$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild
$AbstractRunner.perform(AbstractBuild.java:664)
at hudson.model.Build$RunnerImpl.build(Build.java:177)
at hudson.model.Build$RunnerImpl.doRun(Build.java:139)
at hudson.model.AbstractBuild
$AbstractRunner.run(AbstractBuild.java:430)
at hudson.model.Run.run(Run.java:1376)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at
hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:175)
Caused by: java.io.IOException: CreateProcess error=2, The system
cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 16 more
Build step 'Invoke top-level Maven targets' marked build as failure
Archiving artifacts
Recording test results
Finished: FAILURE

Carsten Ringe

unread,
Jul 19, 2011, 2:03:20 PM7/19/11
to jenkins...@googlegroups.com
Looks like "mvn.bat" is not found in your PATH.

Basically, you try to start the batch script mvn.bat in your workspace. I bet you have installed it somewhere and you should point your command to that installation directory. Try something like this as a build step batch script:

C:\yourmaven\bin\mvn.bat clean install

I think you created a freestyle job, but if you build with maven you should use the maven job configuration. That way you can configure the maven version globally in the jenkins administration and specify it in the job.

dbo3587

unread,
Jul 19, 2011, 2:20:28 PM7/19/11
to Jenkins Users
I think that first error might have been cause by me having set the
Maven Version to look for the default version, as opposed to 3.0.3
which is what i have installed. I this trying to download a plugin but
failing because it cannot get access to the site?

Cleaning up C:\Program Files\Jenkins\jobs\game-of-life-default
\workspace\.
Updating svn://localhost/gameoflife/trunk
At revision 9
no change for svn://localhost/gameoflife/trunk since the previous
build
[workspace] $ "C:\Program Files\Apache Maven\3.0.3\apache-
maven-3.0.3\bin\mvn.bat" clean package
[INFO] Scanning for projects...
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building Game of Life business logic module 0.0.1-SNAPSHOT
[INFO]
------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom

[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 0.906s
[INFO] Finished at: Tue Jul 19 11:07:10 PDT 20112
[INFO] Final Memory: 3M/15M
[INFO]
------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or
one of its dependencies could not be resolved: Failed to read artifact
descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1:
Could not transfer artifact org.apache.maven.plugins:maven-clean-
plugin:pom:2.4.1 from/to central (http://repo1.maven.org/maven2):
Error transferring file: repo1.maven.org: Unknown host repo1.maven.org
-> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with
the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

Carsten Ringe

unread,
Jul 20, 2011, 1:16:29 AM7/20/11
to jenkins...@googlegroups.com
Do you use a proxy in your network? I failed on that in the beginning...

You can always use the -X switch when you run maven to get more details about the build. It was very useful for me when I set up my first maven jobs.
Reply all
Reply to author
Forward
0 new messages