John,
That worked! Thanks. I am pretty sure I read something about that
before, so now I feel a bit silly to have asked. :-)
Anyway, I was asking so that I could have maven.test.skip set to true by
default, but still be able to override it on the command line. It seems
like this should work without any trickery, but there is a bug in
maven's handling of system properties that prevents it from working.
With help from Kenney Westerhof and you, I've got a solution now. I am
describing it here for anyone else that might need to do this, in hopes
that they will find it in the mailing list archives.
Put this in your settings.xml file to skip tests by default, while
retaining the ability to run them by putting -Dmaven.test.skip=false on
the command line:
<!-- skip tests by default, but allow override on command line -->
<profile>
<activation>
<property>
<name>!maven.test.skip</name>
</property>
</activation>
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
</profile>
-Max
John Casey wrote:
> Try:
>
> <activation><property><name>!X</name></property></activation>
>
> ...activated when the system property is undefined.
>
>
<activation><property><name>X</name><value>!Y</value></property></activation>
>
>
> ...activated when the system property's value is != Y.
>
> HTH,
>
> John
>
> On 5/22/06, Max Cooper <[EMAIL PROTECTED]> wrote:
>
>>
>> I guess I should have been more clear. I want a profile to be active
>> ONLY when the property X is NOT set.
>>
>> Here's my XML psuedo-code for what I want:
>>
>> <activation>
>> <not>
>> <property>
>> <name>X</name>
>> </property>
>> </not>
>> </activation>
>>
>> I have been playing with <activeByDefault> and using 'mvn
>> help:active-profiles' to see what profiles are active, but I have not
>> found a solution yet.
>>
>> -Max
>>
>> Allan Ramirez wrote:
>> > Yes, set the profile in the settings.xml via <activeProfiles>
section.
>> >
>>
http://maven.apache.org/guides/introduction/introduction-to-profiles.html
>> >
>> > Max Cooper wrote:
>> >
>> >> I know that I can make a profile active when a property is set...
>> >> <activation><property><name>X</name></property></activation>
>> >>
>> >> Or when a property is set to a certain value...
>> >>
>>
<activation><property><name>X</name><value>Y</value></property></activation>
>>
>> >>
>> >>
>> >>
>> >> Is there a way to make a profile active when a certain property is
NOT
>> >> set?
>> >>
>> >> Thanks,
>> >> -Max
>> >>
>> >>
---------------------------------------------------------------------
>> >> 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]