You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Reynald Borer <re...@elca.ch> on 2009/09/25 15:58:56 UTC

Question about maven profiles activation

Dear all,

I have been browsing the Maven Book online recently (available on 
http://www.sonatype.com/books/maven-book/reference/public-book.html), 
and I have found something interesting about the profiles used in Maven 
in one example: 
http://www.sonatype.com/books/maven-book/reference/profiles-sect-tips-tricks.html

Basically, this example does the following:
- in settings.xml, we define a profile, active by default, that set an 
environment variable;
- in a module pom.xml, we activate another profile based on the presence 
of the previous environment variable.

This is a functionality that looked very interesting at first, with the 
only drawback that I was not able to make it work. The only solution to 
activate the profile defined in the pom.xml file was to explicitly set 
the environment variable on the command-line, which is not what I want 
to do.

I have tested this with versions 2.0.10 and 2.2.1, and both do not work. 
Does anyone know if what is presented in this example should work ? Or 
does anyone of you know a similar way of achieving such functionality ?

Thanks in advance for your help,
Reynald Borer


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


Re: Question about maven profiles activation

Posted by Reynald Borer <re...@elca.ch>.
Hi,

It is indeed exactly my issue. Does anyone of you knows more about this 
? I think I will have to wait on this error report to see if such a 
trick is really possible or not.

Cheers,
Reynald



On 09/25/2009 05:11 PM, Juven Xu wrote:
> I think this issue is related:
>
> https://issues.sonatype.org/browse/MVNDEF-261
>
> On Fri, Sep 25, 2009 at 9:58 PM, Reynald Borer<re...@elca.ch>wrote:
>
>    
>> Dear all,
>>
>> I have been browsing the Maven Book online recently (available on
>> http://www.sonatype.com/books/maven-book/reference/public-book.html), and
>> I have found something interesting about the profiles used in Maven in one
>> example:
>> http://www.sonatype.com/books/maven-book/reference/profiles-sect-tips-tricks.html
>>
>> Basically, this example does the following:
>> - in settings.xml, we define a profile, active by default, that set an
>> environment variable;
>> - in a module pom.xml, we activate another profile based on the presence of
>> the previous environment variable.
>>
>> This is a functionality that looked very interesting at first, with the
>> only drawback that I was not able to make it work. The only solution to
>> activate the profile defined in the pom.xml file was to explicitly set the
>> environment variable on the command-line, which is not what I want to do.
>>
>> I have tested this with versions 2.0.10 and 2.2.1, and both do not work.
>> Does anyone know if what is presented in this example should work ? Or does
>> anyone of you know a similar way of achieving such functionality ?
>>
>> Thanks in advance for your help,
>> Reynald Borer
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>      
>
>    

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


Re: Question about maven profiles activation

Posted by Juven Xu <ju...@sonatype.com>.
I think this issue is related:

https://issues.sonatype.org/browse/MVNDEF-261

On Fri, Sep 25, 2009 at 9:58 PM, Reynald Borer <re...@elca.ch>wrote:

> Dear all,
>
> I have been browsing the Maven Book online recently (available on
> http://www.sonatype.com/books/maven-book/reference/public-book.html), and
> I have found something interesting about the profiles used in Maven in one
> example:
> http://www.sonatype.com/books/maven-book/reference/profiles-sect-tips-tricks.html
>
> Basically, this example does the following:
> - in settings.xml, we define a profile, active by default, that set an
> environment variable;
> - in a module pom.xml, we activate another profile based on the presence of
> the previous environment variable.
>
> This is a functionality that looked very interesting at first, with the
> only drawback that I was not able to make it work. The only solution to
> activate the profile defined in the pom.xml file was to explicitly set the
> environment variable on the command-line, which is not what I want to do.
>
> I have tested this with versions 2.0.10 and 2.2.1, and both do not work.
> Does anyone know if what is presented in this example should work ? Or does
> anyone of you know a similar way of achieving such functionality ?
>
> Thanks in advance for your help,
> Reynald Borer
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
- juven