Thursday, June 27, 2013

Propagating java system properties to maven project code - issue solved

Issue description: I have got Hudson/Jenkins project. It is build via maven. Maven "Goals and options" is set to
test -DxxxApiConfigFile=config-xxxApi-client-jenkins

Starting console command "mvn test -DxxxApiConfigFile=config-xxxApi-client-jenkins" behaves correctly - the system property is set. But running

Solution: Maven field "Goals and options" has to be set to:
-DargLine="-DxxxApiConfigFile=config-xxxApi-client-jenkins" clean test

or even better:
-DxxxApiConfigFile=config-xxxApi-client-jenkins -DargLine="-DxxxApiConfigFile=config-xxxApi-client-jenkins" test


Sourcehttp://www.cowtowncoder.com/blog/archives/2010/04/entry_385.html

No comments:

Post a Comment