I generally use a Profile when I want to do something of this nature.
So, for your case, you might have something like...
<properties>
<skipTests>true</skipTests>
</properties>
<profiles>
<profile>
<id>run-tests</id>
<properties>
<skipTests>false</skipTests>
</properties>
</profile>
</profiles>
Then by simply calling Maven with the profile activated, you can run the
tests...
mvn -Prun-tests clean install
Yaakov Chaikin wrote:
> Right... I figured that... But why? Isn't something on the
> command-line supposed to trump it all?
>
> Any suggestions on how to correct this?
>
> Thanks,
> Yaakov.
>
>
> On Thu, Nov 12, 2009 at 5:23 PM, David C. Hicks <[email protected]> wrote:
>
>> I think it's an order-of-evaluation problem. I suspect that your
>> -DskipTests=true is getting overridden by the <property> in your pom.xml.
>>
>> Yaakov Chaikin wrote:
>>
>>> Ok,
>>>
>>> Checked documentation, googled. Still not understanding why the
>>> following is happening.
>>>
>>> I have a multi-module project. In the root pom.xml, I have:
>>> <properties>
>>> <skipTests>true</skipTests>
>>> <properties>
>>>
>>>
>>> In my child pom.xml I have the following:
>>>
>>> <properties>
>>> <skipTests>${skipSelfContainingTests}</skipTests>
>>> <properties>
>>>
>>> In my settings.xml, I have this:
>>> <properties>
>>> <skipSelfContainingTests>false</skipSelfContainingTests>
>>> </properties>
>>>
>>> When I do mvn help:effective-pom on the child module, it does show
>>> that my skipTests=false. However, when I do mvn help:effective-pom
>>> -DskipTests=true, the effective pom STILL shows up with
>>> skipTests=false!
>>>
>>> What am I doing wrong here?
>>>
>>> Thanks,
>>> Yaakov.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]