maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Todorov (JIRA)" <j...@codehaus.org>
Subject [jira] (MNG-5685) Profile with multiple conditions gets activated incorrectly
Date Tue, 09 Sep 2014 16:51:10 GMT
Martin Todorov created MNG-5685:
-----------------------------------

             Summary: 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:

 - 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.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Mime
View raw message