Cannot pass Properties to Maven Project builds

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Cannot pass Properties to Maven Project builds

Qazwart-2
When I execute a Maven build, I get the following:

/var/lib/hudson/tools/Java_1.6.19/bin/java -DskipTests -cp
/var/lib/hudson/plugins/maven-plugin/WEB-INF/lib/maven-agent-1.357.jar:/var/lib/hudson/tools/Maven_2.2.1/boot/classworlds-1.1.jar
hudson.maven.agent.Main /var/lib/hudson/tools/Maven_2.2.1
/var/lib/hudson/war/WEB-INF/lib/remoting-1.357.jar
/var/lib/hudson/plugins/maven-plugin/WEB-INF/lib/maven-interceptor-1.357.jar
45589 /var/lib/hudson/plugins/maven-plugin/WEB-INF/lib/maven2.1-interceptor-1.2.jar
<===[HUDSON REMOTING CAPACITY]===>channel started
Executing Maven:  -B -f
/var/lib/hudson/jobs/MONSTER-SOW-14172/workspace/SOW_14172_CRM_ETL/pom.xml
clean package

I am trying to pass -DskipTests (which is in the command line) to the
Maven project. I do this by putting "-DskipTests" in the MVN_OPTS
field in the project.

As you can see, the properties are not getting passed. How can I get
around this issue?

--
David Weintraub
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Cannot pass Properties to Maven Project builds

Paul Weiss-2
On Wed, 26 May 2010 12:55:45 -0400, David Weintraub <[hidden email]>  
wrote:

> When I execute a Maven build, I get the following:
>
> /var/lib/hudson/tools/Java_1.6.19/bin/java -DskipTests -cp
> /var/lib/hudson/plugins/maven-plugin/WEB-INF/lib/maven-agent-1.357.jar:/var/lib/hudson/tools/Maven_2.2.1/boot/classworlds-1.1.jar
> hudson.maven.agent.Main /var/lib/hudson/tools/Maven_2.2.1
> /var/lib/hudson/war/WEB-INF/lib/remoting-1.357.jar
> /var/lib/hudson/plugins/maven-plugin/WEB-INF/lib/maven-interceptor-1.357.jar
> 45589  
> /var/lib/hudson/plugins/maven-plugin/WEB-INF/lib/maven2.1-interceptor-1.2.jar
> <===[HUDSON REMOTING CAPACITY]===>channel started
> Executing Maven:  -B -f
> /var/lib/hudson/jobs/MONSTER-SOW-14172/workspace/SOW_14172_CRM_ETL/pom.xml
> clean package
>
> I am trying to pass -DskipTests (which is in the command line) to the
> Maven project. I do this by putting "-DskipTests" in the MVN_OPTS
> field in the project.
>
> As you can see, the properties are not getting passed. How can I get
> around this issue?
>

MAVEN_OPTS are for arguments to java, not for arguments to Maven
What you want is to put -Dskiptests in the field that says "Goals and  
options"

-P

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Cannot pass Properties to Maven Project builds

Qazwart-2
On Wed, May 26, 2010 at 1:10 PM, Paul G. Weiss <[hidden email]> wrote:
>
> MAVEN_OPTS are for arguments to java, not for arguments to Maven
> What you want is to put -Dskiptests in the field that says "Goals and
> options"

Yup. That makes perfect sense: The field labeled MAVEN_OPTS aren't
options for Maven, but for Java.

This USE to work a while back. I was suddenly started that this
stopped working when we upgraded.

I'll have to give it a try of putting the options in the goals field.


--
David Weintraub
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]