[
https://jira.codehaus.org/browse/MNG-5685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Todorov updated MNG-5685:
--------------------------------
Description:
Consider the following simple profile:
{code}
...
<profile>
<id>some-profile</id>
<activation>
<property>
<name>!skipTests</name>
</property>
<activeByDefault>false</activeByDefault>
</activation>
...
<profile>
...
{code}
I would expect that this profile will not be active by default. Furthermore, it
will not be active if the tests are skipped.
However, if you execute:
{code}
mvn help:active-profiles
{code}
you will see:
{code}
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building foo-bar: baz 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-help-plugin:2.2:active-profiles (default-cli) @
org.foo.bar:baz ---
[INFO]
Active Profiles for Project 'org.foo.bar:baz:jar:1.0-SNAPSHOT':
The following profiles are active:
- some-profile (source: org.foo.bar:baz:1.0-SNAPSHOT)
{code}
If you pass in -DskipTests, the profile gets disabled, but you shouldn't have
to do this.
I believe this is related to MNG-4565.
was:
Consider the following simple profile:
{code}
...
<profile>
<id>some-profile</id>
<activation>
<property>
<name>!skipTests</name>
</property>
<activeByDefault>false</activeByDefault>
</activation>
...
<profile>
...
{code}
I would expect that this profile will not be active by default. Furthermore, it
will not be active if the tests are skipped.
However, if you execute:
{code}
mvn help:active-profiles
{code}
you will see:
{code}
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building foo-bar: baz 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-help-plugin:2.2:active-profiles (default-cli) @
org.foo.bar:baz ---
[INFO]
Active Profiles for Project 'org.foo.bar:baz:jar:1.0-SNAPSHOT':
The following profiles are active:
- reserve-ports (source: org.foo.bar:baz:1.0-SNAPSHOT)
{code}
If you pass in -DskipTests, the profile gets disabled, but you shouldn't have
to do this.
I believe this is related to MNG-4565.
> Profile with multiple conditions gets activated incorrectly
> -----------------------------------------------------------
>
> Key: MNG-5685
> URL: https://jira.codehaus.org/browse/MNG-5685
> Project: Maven
> Issue Type: Bug
> Reporter: Martin Todorov
>
> Consider the following simple profile:
> {code}
> ...
> <profile>
> <id>some-profile</id>
> <activation>
> <property>
> <name>!skipTests</name>
> </property>
> <activeByDefault>false</activeByDefault>
> </activation>
> ...
> <profile>
> ...
> {code}
> I would expect that this profile will not be active by default. Furthermore,
> it will not be active if the tests are skipped.
> However, if you execute:
> {code}
> mvn help:active-profiles
> {code}
> you will see:
> {code}
> [INFO] Scanning for projects...
> [INFO]
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building foo-bar: baz 1.0-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-help-plugin:2.2:active-profiles (default-cli) @
> org.foo.bar:baz ---
> [INFO]
> Active Profiles for Project 'org.foo.bar:baz:jar:1.0-SNAPSHOT':
> The following profiles are active:
> - some-profile (source: org.foo.bar:baz:1.0-SNAPSHOT)
> {code}
> If you pass in -DskipTests, the profile gets disabled, but you shouldn't have
> to do this.
> I believe this is related to MNG-4565.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)