You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by laredotornado-3 <la...@gmail.com> on 2013/04/04 04:54:51 UTC

Possible to write a boolean expression in Maven?

Hi,

I'm using Maven 3.0.3.  Within one of my plugins, I have

<skip>${skipExecution}</skip>

in which I define "skipExecution" within a profile.  However, what I would
really like to say is

<skip>${skipExecution} || ${maven.test.skip}</skip>

but I'm not sure how to say that in Maven.  Any ideas?  Thanks, - Dave



--
View this message in context: http://maven.40175.n5.nabble.com/Possible-to-write-a-boolean-expression-in-Maven-tp5752598.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: Possible to write a boolean expression in Maven?

Posted by Anders Hammar <an...@hammar.net>.
The only solution I can think of is to have two profiles each triggered by
one of the properties and then set a third property which you use in the
skip declaration. Remember to also define a default value for that third
property to cover when neither of the profiles are triggered.

I should state that i personally dislike profiles and think that the
solution above is a filthy solution making the pom difficult to understand.
You should settle on one single property.

/Anders


On Thu, Apr 4, 2013 at 4:54 AM, laredotornado-3 <la...@gmail.com>wrote:

> Hi,
>
> I'm using Maven 3.0.3.  Within one of my plugins, I have
>
> <skip>${skipExecution}</skip>
>
> in which I define "skipExecution" within a profile.  However, what I would
> really like to say is
>
> <skip>${skipExecution} || ${maven.test.skip}</skip>
>
> but I'm not sure how to say that in Maven.  Any ideas?  Thanks, - Dave
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Possible-to-write-a-boolean-expression-in-Maven-tp5752598.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>