maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Heinz Marbaise <khmarba...@gmx.de>
Subject Re: Profile - activeByDefault in Maven 3.0
Date Sat, 03 Dec 2011 18:30:01 GMT
Hi,
to activate your dev-profile you need to it a little bit tricky...

You need to define in the settings.xml a thing like the following:

        <profile>
          <id>test-dev</id>
          <activation>
            <activeByDefault>false</activeByDefault>
          </activation>
          <properties>
             <test.dev>yes</test.dev>
          </properties>
        </profile>

you can activate that profile by using activation rules (via existing 
file or properties etc.). or by activating it via

   <activeProfiles>
     <activeProfile>test-dev</activeProfile>
   </activeProfiles>

than you need to put a thing like this in your pom.xml:

   <profiles>
     <profile>
       <id>test-dev</id>
       <activation>
         <activeByDefault>false</activeByDefault>
         <property>
           <name>test.dev</name>
           <value>yes</value>
         </property>
       </activation>
       <modules>
         <module>sub-1</module>
       </modules>
     </profile>
   </profiles>

This will work as you expect it to work....

Kind regards
Karl Heinz Marbaise
-- 
SoftwareEntwicklung Beratung Schulung    Tel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl Heinz Marbaise        ICQ#: 135949029
Hauptstrasse 177                         USt.IdNr: DE191347579
52146 W├╝rselen                           http://www.soebes.de

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


Mime
View raw message