Thanks Tim, that worked well.

Another question, is there a way to specify an <OR> condition for
activation. Currently I have:

            <activation>
                <property>
                    <name>!maven.test.skip</name>
                </property>
            </activation>

but I would like to say:

            <activation>
              <or>
                <property>
                    <name>!maven.test.skip</name>
                </property>
                <property>
                    <name>maven.test.skip</name>
                    <value>false</value>
                </property>
              </or>
            </activation>

Also a <not> operator would do:

            <activation>
              <not>
                <property>
                    <name>maven.test.skip</name>
                    <value>true</value>
                </property>
              </not>
            </activation>

That would make the profile more robust.

Any way to express anyone of the above? The docs are quite vague.


Tim Kettler wrote:
> 
> Hi,
> 
> Have you tried putting the plugin definition in a profile activated by 
> the value of the 'maven.test.skip' property.
> 
> -Tim
> 
> Jose Alberto Fernandez schrieb:
>> Hi,
>> 
>> I have a maven-antrun-plugin that must execute before running the test
>> suit
>> to make sure that my database schema is in sync with the code. That works
>> fine. However, I would like for this task to only execute when tests are
>> actually run. That is if I set maven.test.skip=true I would prefer for
>> the
>> schema to not be upgraded.
>> 
>> The reason being that I may be just working on the code and do not want
>> to
>> upgrade the schema until I am ready to others to see my changes (which
>> means
>> the code changes can be committed, as they at least compile).
>> 
>> Is there any way to achieve this? I try to set the plugin to the
>> test-compile phase, but it seem to execute even when the tests are not
>> run. 
>> 
>> Any advise on what is the best way to get to this?
>> 
>> Jose Alberto
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Preconditions-for-testing-tf3964476s177.html#a11253497
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to