Haroon Rafique <[EMAIL PROTECTED]> writes:

> Hi,
>
> I'm using maven 2.0.4 on a Gentoo Linux machine. Does anyone have
> experience in activating profiles based on environment variables? I
> figure using the env prefix would do the trick. So, far I have tried:
>
>         <profile>
>             <id>haroon-workstation</id>
>             <activation>
>                 <property>
>                     <name>env.BLAH</name>
>                     <value>blah</value>
>                 </property>
>             </activation>
>             <properties>
>                 <user.install.root>/www/tomcat</user.install.root>
>             </properties>
>         </profile>
>
> After setting:
>       export BLAH=blah
> and execuging:
>       mvn help:active-profile
> I still get:

Not sure but I think that what you call environment variables are
actually system properties set on maven's cli: Try

<activation>
    <property>
        <name>BLAH</name>
        <value>blah</value>
    </property>
</activation>

mvn -DBLAH=blah help:active-profile


HTH


-- 
OQube < software engineering \ génie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com


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

Reply via email to