Mick,

I just discovered how to use profiles myself. I hope
the following will help.
First, you don't need to run mvn always and check the
end results to make sure everything is alright.

Just do:
mvn help:active-profiles 
and it will list you all the profiles which will be
used.

In my case I could get profiles working in one of
these ways:
1. add activeprofile to settings.xml
    <activeProfiles>
        <activeProfile>default</activeProfile>
    </activeProfiles>

2. specify profiles as param values as:

        <profile>
            <id>skipunittest</id>
            <properties>
               
<maven.test.skip>true</maven.test.skip>
            </properties>
            <activation>
              <property>
                <name>test</name>
              </property>
            </activation>
        </profile>
then call 

mvn help:active-profiles -Dtest
or
mvn install -Dtest

etc.. Note that each property is a separate param as
mvn help:active-profiles -Dtest -DtoProduction -Dmyapp

where test, toProduction, myapp are different profiles
I want to enable.

I couldn't get -P to use the correct profiles. Env I
think it worked but it is more to type. :)

See also this link for more info:
http://maven.apache.org/guides/introduction/introduction-to-profiles.html

good luck,
Attila        

 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to