maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte" <rfscho...@apache.org>
Subject Re: activeProfiles
Date Sun, 24 Mar 2013 14:46:38 GMT
For our mojo-projects we often have a profile for integration-tests, which  
is active by default with the following trick:
       <activation>
         <property>
           <name>skipTests</name>
           <value>!true</value>
         </property>
       </activation>

This means that if and only if there's a property skipTests and its value  
is true, the profile is deactivated.

Robert

Op Sun, 24 Mar 2013 15:41:57 +0100 schreef Eric Kolotyluk  
<eric.kolotyluk@gmail.com>:

> I was trying to avoid having two setting.xml files. I was also thinking  
> of
> having two login accounts each with their own settings.xml as role based
> login makes more sense. Thanks for confirming my thinking.
>
> Seriously too bad that <activeProfiles> cannot be in a pom.xml file.
>
> Cheers, Eric
> On Mar 23, 2013 7:15 AM, "Wayne Fay" <waynefay@gmail.com> wrote:
>
>> > I am trying to set up my projects so that the POM knows which profile  
>> to
>> > activate, but it seems you cannot put <activeProfiles> in a POM, only
 
>> in
>> a
>> > settings.xml file. Is there some reason for this?
>> >
>> > Is there some other Maven way to do what I want to do? How do other
>> people
>> > separate work development from personal development?
>>
>> One technique I've employed uses two settings.xml files. First you  
>> should
>> know about the -s option when calling mvn, look it up. Copy mvn.bat to
>> mvnp.bat and mvnw.bat (or .sh). In mvnp.bat, specify -s
>> settings-personal.xml and in mvnw.bat, specify -s settings-work.xml.
>>
>> Then call mvnw or mvnp instead of mvn. You can also adjust mvn.bat  
>> directly
>> and use that for personal (or work, whichever is most common).
>>
>> Or just set up another user account and log in/out depending on what you
>> are working on, each with its own settings.xml. This is easier on
>> Linux/Unix.
>>
>> Wayne

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


Mime
View raw message