You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Geoffrey De Smet <ge...@gmail.com> on 2007/05/23 17:13:20 UTC

or in maven expression, something like ${${maven.test.skip} || !${database.available}}

Hi,

I'd like to skip the tests for my build if no database is available.
When a database is available, the developer puts in an active profile in 
his settings.xml with property:
   <database.available>true</database.available>

Can I configure the surefire plugin's like this:

<skip>${${maven.test.skip} || !${database.available}}</skip>
so skip the tests if maven.test.skip is on or if the database is not 
available.

This way even developers with a database can skip them by using the all 
known command "-Dmaven.test.skip"

-- 
With kind regards,
Geoffrey De Smet


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: or in maven expression, something like ${${maven.test.skip} || !${database.available}}

Posted by Geoffrey De Smet <ge...@gmail.com>.
I can't solve it yet, but a much cleaner way seemed like doing this:

- maven.test.skip=true by default in the pom
- make a profile databaseAvailable in settings.xml and activate it by 
default
- reuse that profile in the default pom to maven.test.skip=false

Now the problem is "mvn -Dmaven.test.skip=true install" still doesn't 
work because the profile system property wins over the command line 
system property. Is this a known bug?


With kind regards,
Geoffrey De Smet

Geoffrey De Smet schreef:
> Hi,
> 
> I'd like to skip the tests for my build if no database is available.
> When a database is available, the developer puts in an active profile in 
> his settings.xml with property:
>   <database.available>true</database.available>
> 
> Can I configure the surefire plugin's like this:
> 
> <skip>${${maven.test.skip} || !${database.available}}</skip>
> so skip the tests if maven.test.skip is on or if the database is not 
> available.
> 
> This way even developers with a database can skip them by using the all 
> known command "-Dmaven.test.skip"
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org