How to call Maven in a freestyle project

184 views
Skip to first unread message

Jirong Hu

unread,
Nov 6, 2015, 5:45:19 PM11/6/15
to Jenkins Users
As you can see the error below, mvn command is executed in the Maven installation path, but I specify the project as custom workspace in C:\OTPPB2015\Workspace\Maven\simple. Just want to do a simple demo so it's not in any source control system. How can I let Jenkins execute the mvn command inside the workspace?


Building on master in workspace C:\OTPPB2015\Workspace\Maven\simple
[simple] $ cmd.exe /C '"C:\Tools\apache-maven-3.3.3\bin\mvn.cmd deploy && exit %%ERRORLEVEL%%"'
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.075 s
[INFO] Finished at: 2015-11-06T17:30:18-05:00
[INFO] Final Memory: 5M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\OTPPB2015\Workspace\Maven\simple). Please verify you invoked Maven from the correct directory. -> [Help 1]

Karl Heinz Marbaise

unread,
Nov 7, 2015, 7:19:48 AM11/7/15
to jenkins...@googlegroups.com
Hi,

may be i misunderstand your question but the command is executed in
Jenkins workspace...

?

Kind regards
Karl Heinz Marbaise
On 11/6/15 11:45 PM, Jirong Hu wrote:
> As you can see the error below, mvn command is executed in the Maven installation path, but I specify the project as custom workspace inC:\OTPPB2015\Workspace\Maven\simple. Just want to do a simple demo so

Jirong Hu

unread,
Nov 9, 2015, 9:47:35 AM11/9/15
to Jenkins Users, in...@soebes.de
You are right, my bad, the project name is simple1, not simple. Thanks for helping.
Reply all
Reply to author
Forward
0 new messages