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:
[INFO] [help:active-profiles]
[INFO]
Active Profiles for Project 'ca.utoronto.sis:sws:war:1.0':
There are no active profiles.
On an aside, the only way I can activate that profile is to use !env.BLAH:
<profile>
<id>haroon-workstation</id>
<activation>
<property>
<name>!env.BLAH</name>
</property>
</activation>
<properties>
<user.install.root>/www/tomcat</user.install.root>
</properties>
</profile>
Is this a bug? Should I raise a jira issue?
What I'm eventually trying to do is to do some per host profile
activation, so I was thinking of using env.HOSTNAME as the activation. Any
ideas to do something similar?
Thanks,
--
Haroon Rafique
<[EMAIL PROTECTED]>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]