You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Sonnek, Ryan" <Ry...@bpc.com> on 2004/03/01 16:42:03 UTC
setting properties
Any pointers on how to set properties from within my maven.xml? I've got a
short custom goal to set properties, then call install:
<goal name="all:install">
<j:set var="maven.test.skip" value="true" />
<attainGoal name="multiproject:install-snapshot" />
</goal>
when I run this goal, tests are still run. If I run this from the command
line, tests are not run:
maven multiproject:install-snapshot -Dmaven.test.skip=true
are properties from the command line propogated to subprojects, but
properties set in maven.xml not?
Ryan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: setting properties
Posted by "matthew.hawthorne" <ma...@apache.org>.
Sonnek, Ryan wrote:
> Any pointers on how to set properties from within my maven.xml? I've got a
> short custom goal to set properties, then call install:
>
> <goal name="all:install">
> <j:set var="maven.test.skip" value="true" />
> <attainGoal name="multiproject:install-snapshot" />
> </goal>
>
> when I run this goal, tests are still run. If I run this from the command
> line, tests are not run:
> maven multiproject:install-snapshot -Dmaven.test.skip=true
>
> are properties from the command line propogated to subprojects, but
> properties set in maven.xml not?
There's an entry in the Maven wiki about this, named "writing maven.xml"
or something like that.
You need to set the variable so that the test plugin can see it. This
is done like:
{pom.getPluginContext("maven-test-plugin").setVariable("maven.test.skip",
"false")}
This may not be the exact syntax -- check out the wiki for the full
details. I think
this will get you on the right track.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org