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é <[email protected]>
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: [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]