Hello all,

I'm having a little problem with profiles that I can't quite seem to figure 
out.  I have a pom that has 3 profiles defined in it.  2 active by default and 
one active if a env var is set (BUILD_TAG).  My little test pom is below.

Now, when I do not set BUILD_TAG, it works as I expect.  

[INFO] [help:active-profiles]
[INFO]
Active Profiles for Project 'test:test:pom:0.1':

The following profiles are active:

 - win32 (source: pom)
 - win64 (source: pom)
 - profile-1 (source: settings.xml)

But as soon as I set the env var, the win32 and win64 profiles go away:

[INFO] [help:active-profiles]
[INFO]
Active Profiles for Project 'test:test:pom:0.1':

The following profiles are active:

 - hudson (source: pom)
 - profile-1 (source: settings.xml)

We typically use Maven 2.1.0 but I have also tested Maven 2.2.1.  I tried Maven 
3.0 and that ignores the env var all together.  Any ideas on what I may be 
doing wrong in my pom?

-Jim


<?xml version="1.0" encoding="UTF-8"?>
<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>test</groupId>
    <artifactId>test</artifactId>
    <packaging>pom</packaging>
    <version>0.1</version>
    <profiles>
        <profile>
            <id>win32</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
        </profile>
        <profile>
            <id>win64</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
        </profile>
        <profile>
            <id>hudson</id>
            <activation>
                <activeByDefault>false</activeByDefault>
                <property>
                    <name>env.BUILD_TAG</name>
                </property>
            </activation>
        </profile>
    </profiles>
</project>


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

Reply via email to