Re: profile activation based on environment variables
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 idharoon-workstation/id activation property nameenv.BLAH/name valueblah/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 nameBLAH/name valueblah/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]
Re: profile activation based on environment variables
On Today at 11:07am, AB=Arnaud Bailly [EMAIL PROTECTED] wrote: AB [..snip..] AB AB Not sure but I think that what you call environment variables are AB actually system properties set on maven's cli: Try AB AB activation AB property AB nameBLAH/name AB valueblah/value AB /property AB /activation AB AB mvn -DBLAH=blah help:active-profile AB AB AB HTH Hi Arnaud, Thanks for the reply, but I'm positive I want environment variables and not system properties. From http://maven.apache.org/settings.html env.X: Prefixing a variable with env. will return the shell's environment variable. For example, ${env.PATH} contains the $path environment variable (%PATH% in Windows). I believe this has been in maven since 2.0.1+ (was implemented via MNG-1525). http://jira.codehaus.org/browse/MNG-1525 Any more insight would be helpful. Regards, -- Haroon Rafique [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: profile activation based on environment variables
Haroon Rafique [EMAIL PROTECTED] writes: Hi Arnaud, Thanks for the reply, but I'm positive I want environment variables and not system properties. From http://maven.apache.org/settings.html env.X: Prefixing a variable with env. will return the shell's environment variable. For example, ${env.PATH} contains the $path environment variable (%PATH% in Windows). I believe this has been in maven since 2.0.1+ (was implemented via MNG-1525). http://jira.codehaus.org/browse/MNG-1525 Any more insight would be helpful. Sorry for the noise :-( -- 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]
profile activation based on environment variables
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 idharoon-workstation/id activation property nameenv.BLAH/name valueblah/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 idharoon-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]