You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Karl Heinz Marbaise <kh...@gmx.de> on 2016/08/12 15:45:21 UTC
Profile Activation
Hi to all,
I have the following profile:
<profile>
<id>profile-not-value-true</id>
<activation>
<property>
<name>profilea</name>
<value>!true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.soebes.maven.plugins</groupId>
<artifactId>echo-maven-plugin</artifactId>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>echo</goal>
</goals>
</execution>
</executions>
<configuration>
<echos>
<echo>profile not value true</echo>
</echos>
</configuration>
</plugin>
</plugins>
</build>
</profile>
So the question is: What would you expect you need to do to activate
this profile?
Currently this profile is activated cause if I don't define the property
"profilea" at all it seemed to that Maven is assuming this means "not
value 'true'" ?
I have assumed it should be activated if the property exists which means
giving it on command line like this:
mvn -Dprofilea
WDYT ?
Kind regards
Karl Heinz Marbaise
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
RE: Profile Activation
Posted by Martin Gainty <mg...@hotmail.com>.
MG>quick comment
> To: dev@maven.apache.org
> From: khmarbaise@gmx.de
> Subject: Profile Activation
> Date: Fri, 12 Aug 2016 17:45:21 +0200
>
> Hi to all,
>
> I have the following profile:
>
>
> <profile>
> <id>profile-not-value-true</id>
> <activation>
> <property>
> <name>profilea</name>
> <value>!true</value>
> </property>
> </activation>
> <build>
> <plugins>
> <plugin>
> <groupId>com.soebes.maven.plugins</groupId>
> <artifactId>echo-maven-plugin</artifactId>
> <executions>
> <execution>
> <phase>initialize</phase>
> <goals>
> <goal>echo</goal>
> </goals>
> </execution>
> </executions>
> <configuration>
> <echos>
> <echo>profile not value true</echo>
> </echos>
> </configuration>
> </plugin>
> </plugins>
> </build>
> </profile>
>
> So the question is: What would you expect you need to do to activate
> this profile?
>
> Currently this profile is activated cause if I don't define the property
> "profilea" at all it seemed to that Maven is assuming this means "not
> value 'true'" ?
>
> I have assumed it should be activated if the property exists which means
> giving it on command line like this:
>
> mvn -DprofileaMG>assumes the property *must* exist as documented at
MG>http://maven.apache.org/guides/introduction/introduction-to-profiles.html
MG>if ok for system property to not exist or system property to *not* be defined then either:
MG>fix code to detect system property must exist to conform to doc
MG>ORMG>change doc to say : The following profile will be activated when the system property "debug" is defined with a value which is not "true" -OR- when system property "debug" does not exist or when system property "debug" was never defined
>
MG>*Methinks you found a bug Karl*
>
> WDYT ?
>
> Kind regards
> Karl Heinz Marbaise
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
Re: Profile Activation
Posted by Robert Scholte <rf...@apache.org>.
Hi,
I could also reverse the question: how can I have an active profile by
default, which should not be activated when skipITs is set to true. I
don't think there's another solution than the current one. The fact that
skipITs is treated as a boolean makes this example always work and there's
no discussion. Confusion starts because the property can have more than 2
values.
It all depends on the definition. For me it makes perfectly sense that
'mvn package -Denvironment=prod' and 'mvn package', since it fits with
"always active unless environment is production".
AFAIK the current logic has been there since the early versions of Maven,
so I consider it as "works as designed".
The funny thing is that we say you cannot program within the pom, but this
not-expression is the only with some logic and not it seems it is causing
trouble.
Robert
On Fri, 12 Aug 2016 21:18:06 +0200, Karl Heinz Marbaise
<kh...@gmx.de> wrote:
> Hi,
>
> First I have added the documentation about the opportunities like this
> (and other one as well a few days before, cause there had been no
> documentation about that at all
> https://issues.apache.org/jira/browse/MNGSITE-234):
>
>
> <profiles>
> <profile>
> <activation>
> <property>
> <name>!debug</name>
> </property>
> </activation>
> ...
> </profile>
> </profiles>
>
> which means if the property does not exist...and also works exactly like
> this. The value does not matter nor is needed to give some.
>
> If I argue from a logical point of view I would say (and expect):
> <profiles>
> <profile>
> <activation>
> <property>
> <name>debug</name>
> <value>!true</value>
> </property>
> </activation>
> ...
> </profile>
> </profiles>
>
> This would mean: The value is not equal "true"...but the property must
> exist...so something like "-Ddebug=WHATEVER"
>
> The current behaviour is that the previous sentence will be calculated
> by Maven as:
>
> The property is not important nor is needed to exists..and the values is
> not equal to "true"..which I think is wrong...
>
> So it is not possible to express a thing like this:
>
>
> <profiles>
> <profile>
> <activation>
> <property>
> <name>environment</name>
> <value>!dev</value>
> </property>
> </activation>
> ...
> </profile>
> </profiles>
>
> So this will be activated always...So the call:
>
>
> mvn package -Denvironment=prod
> mvn package
>
> would be equivalent...which I think is wrong...
>
> So it is not possible to identify a difference between those two Maven
> calls.
>
>
> Furthermore if I like to use a combination of two profiles like this:
>
> <profiles>
> <profile>
> <id>not-existing</id>
> <activation>
> <property>
> <name>!environment</name>
> </property>
> </activation>
> ...
> </profile>
> <profile>
> <id>not-dev</id>
> <activation>
> <property>
> <name>environment</name>
> <value>!dev</value>
> </property>
> </activation>
> ...
> </profile>
> </profiles>
>
> So if I call maven via:
>
>
> mvn package
>
> the last will take precendence...
>
>
> Kind regards
> Karl Heinz Marbaise
>
> On 12/08/16 19:32, Robert Scholte wrote:
>> Hi,
>>
>> Yes, this is correct. Just to clarify: -Dx is always the same is
>> -Dx=true [1]
>> I'd like to add -Dprofilea= : profile activated
>>
>> 5. mvn initialize -Dprofilea= : profile activated
>>
>> maybe if the property was called skipITs instead of profilea the
>> examples are better to follow, i.e. always activate this profile (with
>> integration-tests), *unless* skipITs is true.
>>
>> Robert
>>
>> [1]
>> https://maven.apache.org/ref/3.3.9/maven-embedder/xref/org/apache/maven/cli/MavenCli.html#L1544
>>
>>
>> On Fri, 12 Aug 2016 18:59:14 +0200, Guillaume Boué <gb...@apache.org>
>> wrote:
>>
>>> Hi Robert,
>>>
>>> If this is expected, I think the documentation in
>>> http://maven.apache.org/guides/introduction/introduction-to-profiles.html
>>> should indeed be clarified. Currently, in that situation, it says
>>>
>>> "The following profile will be activated when the system property
>>> "debug" is defined with a value which is not "true"."
>>>
>>> In this case, when invoking Maven with "mvn initialize", profilea
>>> isn't defined so I would expect the profile not to be activated. This
>>> is also what would happen if the value in the profile activation was
>>> commented out.
>>>
>>> To recap, this is the current result with Maven 3.3.9 for this
>>> situation (and latest 3.4.0-SNAPSHOT):
>>>
>>> 1. mvn initialize: profile activated
>>>
>>> 2. mvn initialize -Dprofilea: profile not activated
>>>
>>> 3. mvn initialize -Dprofilea=false: profile activated
>>>
>>> 4. mvn initialize -Dprofilea=true: profile not activated
>>>
>>> Guillaume
>>>
>>>
>>>> Message du 12/08/16 18:34
>>>> De : "Robert Scholte"
>>>> A : "Maven Developers List"
>>>> Copie à :
>>>> Objet : Re: Profile Activation
>>>>
>>>> Hi Karl Heinz,
>>>>
>>>> you should read the activation like this:
>>>> always activate, *unless* profilea is true.
>>>> So it says nothing about the availability of the property.
>>>> Maybe the documentation isn't clear enough.
>>>>
>>>> Robert
>>>>
>>>> On Fri, 12 Aug 2016 17:45:21 +0200, Karl Heinz Marbaise
>>>> wrote:
>>>>
>>>> > Hi to all,
>>>> >
>>>> > I have the following profile:
>>>> >
>>>> >
>>>> >
>>>> > profile-not-value-true
>>>> >
>>>> >
>>>> > profilea
>>>> > !true
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > com.soebes.maven.plugins
>>>> > echo-maven-plugin
>>>> >
>>>> >
>>>> > initialize
>>>> >
>>>> > echo
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > profile not value true
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > So the question is: What would you expect you need to do to activate
>>>> > this profile?
>>>> >
>>>> > Currently this profile is activated cause if I don't define the
>>>> property
>>>> > "profilea" at all it seemed to that Maven is assuming this means
>>>> "not
>>>> > value 'true'" ?
>>>> >
>>>> > I have assumed it should be activated if the property exists which
>>>> means
>>>> > giving it on command line like this:
>>>> >
>>>> > mvn -Dprofilea
>>>> >
>>>> >
>>>> >
>>>> > WDYT ?
>>>> >
>>>> > Kind regards
>>>> > Karl Heinz Marbaise
>>>> >
>>>> >
>>>> ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>>> > For additional commands, e-mail: dev-help@maven.apache.org
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>
>
> Mit freundlichem Gruß
> Karl-Heinz Marbaise
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Profile Activation
Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi,
First I have added the documentation about the opportunities like this
(and other one as well a few days before, cause there had been no
documentation about that at all
https://issues.apache.org/jira/browse/MNGSITE-234):
<profiles>
<profile>
<activation>
<property>
<name>!debug</name>
</property>
</activation>
...
</profile>
</profiles>
which means if the property does not exist...and also works exactly like
this. The value does not matter nor is needed to give some.
If I argue from a logical point of view I would say (and expect):
<profiles>
<profile>
<activation>
<property>
<name>debug</name>
<value>!true</value>
</property>
</activation>
...
</profile>
</profiles>
This would mean: The value is not equal "true"...but the property must
exist...so something like "-Ddebug=WHATEVER"
The current behaviour is that the previous sentence will be calculated
by Maven as:
The property is not important nor is needed to exists..and the values is
not equal to "true"..which I think is wrong...
So it is not possible to express a thing like this:
<profiles>
<profile>
<activation>
<property>
<name>environment</name>
<value>!dev</value>
</property>
</activation>
...
</profile>
</profiles>
So this will be activated always...So the call:
mvn package -Denvironment=prod
mvn package
would be equivalent...which I think is wrong...
So it is not possible to identify a difference between those two Maven
calls.
Furthermore if I like to use a combination of two profiles like this:
<profiles>
<profile>
<id>not-existing</id>
<activation>
<property>
<name>!environment</name>
</property>
</activation>
...
</profile>
<profile>
<id>not-dev</id>
<activation>
<property>
<name>environment</name>
<value>!dev</value>
</property>
</activation>
...
</profile>
</profiles>
So if I call maven via:
mvn package
the last will take precendence...
Kind regards
Karl Heinz Marbaise
On 12/08/16 19:32, Robert Scholte wrote:
> Hi,
>
> Yes, this is correct. Just to clarify: -Dx is always the same is
> -Dx=true [1]
> I'd like to add -Dprofilea= : profile activated
>
> 5. mvn initialize -Dprofilea= : profile activated
>
> maybe if the property was called skipITs instead of profilea the
> examples are better to follow, i.e. always activate this profile (with
> integration-tests), *unless* skipITs is true.
>
> Robert
>
> [1]
> https://maven.apache.org/ref/3.3.9/maven-embedder/xref/org/apache/maven/cli/MavenCli.html#L1544
>
>
> On Fri, 12 Aug 2016 18:59:14 +0200, Guillaume Bou� <gb...@apache.org>
> wrote:
>
>> Hi Robert,
>>
>> If this is expected, I think the documentation in
>> http://maven.apache.org/guides/introduction/introduction-to-profiles.html
>> should indeed be clarified. Currently, in that situation, it says
>>
>> "The following profile will be activated when the system property
>> "debug" is defined with a value which is not "true"."
>>
>> In this case, when invoking Maven with "mvn initialize", profilea
>> isn't defined so I would expect the profile not to be activated. This
>> is also what would happen if the value in the profile activation was
>> commented out.
>>
>> To recap, this is the current result with Maven 3.3.9 for this
>> situation (and latest 3.4.0-SNAPSHOT):
>>
>> 1. mvn initialize: profile activated
>>
>> 2. mvn initialize -Dprofilea: profile not activated
>>
>> 3. mvn initialize -Dprofilea=false: profile activated
>>
>> 4. mvn initialize -Dprofilea=true: profile not activated
>>
>> Guillaume
>>
>>
>>> Message du 12/08/16 18:34
>>> De : "Robert Scholte"
>>> A : "Maven Developers List"
>>> Copie � :
>>> Objet : Re: Profile Activation
>>>
>>> Hi Karl Heinz,
>>>
>>> you should read the activation like this:
>>> always activate, *unless* profilea is true.
>>> So it says nothing about the availability of the property.
>>> Maybe the documentation isn't clear enough.
>>>
>>> Robert
>>>
>>> On Fri, 12 Aug 2016 17:45:21 +0200, Karl Heinz Marbaise
>>> wrote:
>>>
>>> > Hi to all,
>>> >
>>> > I have the following profile:
>>> >
>>> >
>>> >
>>> > profile-not-value-true
>>> >
>>> >
>>> > profilea
>>> > !true
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > com.soebes.maven.plugins
>>> > echo-maven-plugin
>>> >
>>> >
>>> > initialize
>>> >
>>> > echo
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > profile not value true
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > So the question is: What would you expect you need to do to activate
>>> > this profile?
>>> >
>>> > Currently this profile is activated cause if I don't define the
>>> property
>>> > "profilea" at all it seemed to that Maven is assuming this means "not
>>> > value 'true'" ?
>>> >
>>> > I have assumed it should be activated if the property exists which
>>> means
>>> > giving it on command line like this:
>>> >
>>> > mvn -Dprofilea
>>> >
>>> >
>>> >
>>> > WDYT ?
>>> >
>>> > Kind regards
>>> > Karl Heinz Marbaise
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> > For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
Mit freundlichem Gru�
Karl-Heinz Marbaise
--
SoftwareEntwicklung Beratung Schulung Tel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl-Heinz Marbaise USt.IdNr: DE191347579
Hauptstrasse 177
52146 W�rselen http://www.soebes.de
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Profile Activation
Posted by Robert Scholte <rf...@apache.org>.
Hi,
Yes, this is correct. Just to clarify: -Dx is always the same is -Dx=true
[1]
I'd like to add -Dprofilea= : profile activated
5. mvn initialize -Dprofilea= : profile activated
maybe if the property was called skipITs instead of profilea the examples
are better to follow, i.e. always activate this profile (with
integration-tests), *unless* skipITs is true.
Robert
[1]
https://maven.apache.org/ref/3.3.9/maven-embedder/xref/org/apache/maven/cli/MavenCli.html#L1544
On Fri, 12 Aug 2016 18:59:14 +0200, Guillaume Boué <gb...@apache.org>
wrote:
> Hi Robert,
>
>
> If this is expected, I think the documentation in
> http://maven.apache.org/guides/introduction/introduction-to-profiles.html
> should indeed be clarified. Currently, in that situation, it says
>
>
> "The following profile will be activated when the system property
> "debug" is defined with a value which is not "true"."
>
>
> In this case, when invoking Maven with "mvn initialize", profilea isn't
> defined so I would expect the profile not to be activated. This is also
> what would happen if the value in the profile activation was commented
> out.
>
>
> To recap, this is the current result with Maven 3.3.9 for this situation
> (and latest 3.4.0-SNAPSHOT):
>
>
> 1. mvn initialize: profile activated
>
> 2. mvn initialize -Dprofilea: profile not activated
>
> 3. mvn initialize -Dprofilea=false: profile activated
>
> 4. mvn initialize -Dprofilea=true: profile not activated
>
>
> Guillaume
>
>
>
>> Message du 12/08/16 18:34
>> De : "Robert Scholte"
>> A : "Maven Developers List"
>> Copie à :
>> Objet : Re: Profile Activation
>>
>> Hi Karl Heinz,
>>
>> you should read the activation like this:
>> always activate, *unless* profilea is true.
>> So it says nothing about the availability of the property.
>> Maybe the documentation isn't clear enough.
>>
>> Robert
>>
>> On Fri, 12 Aug 2016 17:45:21 +0200, Karl Heinz Marbaise
>> wrote:
>>
>> > Hi to all,
>> >
>> > I have the following profile:
>> >
>> >
>> >
>> > profile-not-value-true
>> >
>> >
>> > profilea
>> > !true
>> >
>> >
>> >
>> >
>> >
>> > com.soebes.maven.plugins
>> > echo-maven-plugin
>> >
>> >
>> > initialize
>> >
>> > echo
>> >
>> >
>> >
>> >
>> >
>> > profile not value true
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > So the question is: What would you expect you need to do to activate
>> > this profile?
>> >
>> > Currently this profile is activated cause if I don't define the
>> property
>> > "profilea" at all it seemed to that Maven is assuming this means "not
>> > value 'true'" ?
>> >
>> > I have assumed it should be activated if the property exists which
>> means
>> > giving it on command line like this:
>> >
>> > mvn -Dprofilea
>> >
>> >
>> >
>> > WDYT ?
>> >
>> > Kind regards
>> > Karl Heinz Marbaise
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: dev-help@maven.apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Profile Activation
Posted by Guillaume Boué <gb...@apache.org>.
Hi Robert,
If this is expected, I think the documentation in http://maven.apache.org/guides/introduction/introduction-to-profiles.html should indeed be clarified. Currently, in that situation, it says
"The following profile will be activated when the system property "debug" is defined with a value which is not "true"."
In this case, when invoking Maven with "mvn initialize", profilea isn't defined so I would expect the profile not to be activated. This is also what would happen if the value in the profile activation was commented out.
To recap, this is the current result with Maven 3.3.9 for this situation (and latest 3.4.0-SNAPSHOT):
1. mvn initialize: profile activated
2. mvn initialize -Dprofilea: profile not activated
3. mvn initialize -Dprofilea=false: profile activated
4. mvn initialize -Dprofilea=true: profile not activated
Guillaume
> Message du 12/08/16 18:34
> De : "Robert Scholte"
> A : "Maven Developers List"
> Copie à :
> Objet : Re: Profile Activation
>
> Hi Karl Heinz,
>
> you should read the activation like this:
> always activate, *unless* profilea is true.
> So it says nothing about the availability of the property.
> Maybe the documentation isn't clear enough.
>
> Robert
>
> On Fri, 12 Aug 2016 17:45:21 +0200, Karl Heinz Marbaise
> wrote:
>
> > Hi to all,
> >
> > I have the following profile:
> >
> >
> >
> > profile-not-value-true
> >
> >
> > profilea
> > !true
> >
> >
> >
> >
> >
> > com.soebes.maven.plugins
> > echo-maven-plugin
> >
> >
> > initialize
> >
> > echo
> >
> >
> >
> >
> >
> > profile not value true
> >
> >
> >
> >
> >
> >
> >
> > So the question is: What would you expect you need to do to activate
> > this profile?
> >
> > Currently this profile is activated cause if I don't define the property
> > "profilea" at all it seemed to that Maven is assuming this means "not
> > value 'true'" ?
> >
> > I have assumed it should be activated if the property exists which means
> > giving it on command line like this:
> >
> > mvn -Dprofilea
> >
> >
> >
> > WDYT ?
> >
> > Kind regards
> > Karl Heinz Marbaise
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
Re: Profile Activation
Posted by Karl Heinz Marbaise <kh...@gmx.de>.
On 12/08/16 18:34, Robert Scholte wrote:
> Maybe the documentation isn't clear enough.
I have added the documentation about the property activation with "!"
things a few days ago...
Either my assumption was wrong or the the intention is wrong...
Kind regards
Karl Heinz
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Profile Activation
Posted by Robert Scholte <rf...@apache.org>.
Hi Karl Heinz,
you should read the activation like this:
always activate, *unless* profilea is true.
So it says nothing about the availability of the property.
Maybe the documentation isn't clear enough.
Robert
On Fri, 12 Aug 2016 17:45:21 +0200, Karl Heinz Marbaise
<kh...@gmx.de> wrote:
> Hi to all,
>
> I have the following profile:
>
>
> <profile>
> <id>profile-not-value-true</id>
> <activation>
> <property>
> <name>profilea</name>
> <value>!true</value>
> </property>
> </activation>
> <build>
> <plugins>
> <plugin>
> <groupId>com.soebes.maven.plugins</groupId>
> <artifactId>echo-maven-plugin</artifactId>
> <executions>
> <execution>
> <phase>initialize</phase>
> <goals>
> <goal>echo</goal>
> </goals>
> </execution>
> </executions>
> <configuration>
> <echos>
> <echo>profile not value true</echo>
> </echos>
> </configuration>
> </plugin>
> </plugins>
> </build>
> </profile>
>
> So the question is: What would you expect you need to do to activate
> this profile?
>
> Currently this profile is activated cause if I don't define the property
> "profilea" at all it seemed to that Maven is assuming this means "not
> value 'true'" ?
>
> I have assumed it should be activated if the property exists which means
> giving it on command line like this:
>
> mvn -Dprofilea
>
>
>
> WDYT ?
>
> Kind regards
> Karl Heinz Marbaise
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Profile Activation
Posted by Chas Honton <ch...@honton.org>.
The behavior is AND. You can have multiple profiles for OR.
Chas
> On Aug 15, 2016, at 11:45 AM, Christopher <ct...@apache.org> wrote:
>
> If there could be "AND" and "OR" primitives for profile activation
> conditions, you could do something like:
>
> <or>
> <property>
> <name>!profilea</name>
> </property>
> <property>
> <name>profilea</name>
> <value>!true</value>
> </property>
> </or>
>
> Sadly, this feature does not exist.
>
>> On Fri, Aug 12, 2016, 11:45 Karl Heinz Marbaise <kh...@gmx.de> wrote:
>>
>> Hi to all,
>>
>> I have the following profile:
>>
>>
>> <profile>
>> <id>profile-not-value-true</id>
>> <activation>
>> <property>
>> <name>profilea</name>
>> <value>!true</value>
>> </property>
>> </activation>
>> <build>
>> <plugins>
>> <plugin>
>> <groupId>com.soebes.maven.plugins</groupId>
>> <artifactId>echo-maven-plugin</artifactId>
>> <executions>
>> <execution>
>> <phase>initialize</phase>
>> <goals>
>> <goal>echo</goal>
>> </goals>
>> </execution>
>> </executions>
>> <configuration>
>> <echos>
>> <echo>profile not value true</echo>
>> </echos>
>> </configuration>
>> </plugin>
>> </plugins>
>> </build>
>> </profile>
>>
>> So the question is: What would you expect you need to do to activate
>> this profile?
>>
>> Currently this profile is activated cause if I don't define the property
>> "profilea" at all it seemed to that Maven is assuming this means "not
>> value 'true'" ?
>>
>> I have assumed it should be activated if the property exists which means
>> giving it on command line like this:
>>
>> mvn -Dprofilea
>>
>>
>>
>> WDYT ?
>>
>> Kind regards
>> Karl Heinz Marbaise
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Profile Activation
Posted by Christopher <ct...@apache.org>.
If there could be "AND" and "OR" primitives for profile activation
conditions, you could do something like:
<or>
<property>
<name>!profilea</name>
</property>
<property>
<name>profilea</name>
<value>!true</value>
</property>
</or>
Sadly, this feature does not exist.
On Fri, Aug 12, 2016, 11:45 Karl Heinz Marbaise <kh...@gmx.de> wrote:
> Hi to all,
>
> I have the following profile:
>
>
> <profile>
> <id>profile-not-value-true</id>
> <activation>
> <property>
> <name>profilea</name>
> <value>!true</value>
> </property>
> </activation>
> <build>
> <plugins>
> <plugin>
> <groupId>com.soebes.maven.plugins</groupId>
> <artifactId>echo-maven-plugin</artifactId>
> <executions>
> <execution>
> <phase>initialize</phase>
> <goals>
> <goal>echo</goal>
> </goals>
> </execution>
> </executions>
> <configuration>
> <echos>
> <echo>profile not value true</echo>
> </echos>
> </configuration>
> </plugin>
> </plugins>
> </build>
> </profile>
>
> So the question is: What would you expect you need to do to activate
> this profile?
>
> Currently this profile is activated cause if I don't define the property
> "profilea" at all it seemed to that Maven is assuming this means "not
> value 'true'" ?
>
> I have assumed it should be activated if the property exists which means
> giving it on command line like this:
>
> mvn -Dprofilea
>
>
>
> WDYT ?
>
> Kind regards
> Karl Heinz Marbaise
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>