You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Christian Goetze <cg...@miaow.com> on 2007/03/13 00:35:14 UTC

Profile activation via environment?

Why does this not work?

    <profile>
      <id>proxy</id>

      <activation>
       <property>
        <name>env.MAVEN_PROXY_URL</name>
       </property>
      </activation>

      <repositories>
       <repository>
        <id>proxy</id>
        <name>Maven proxy defined by environment</name>
        <url>${env.MAVEN_PROXY_URL}</url>
       </repository>
      </repositories>

      <pluginRepositories>
       <pluginRepository>
        <id>proxy</id>
        <name>Maven proxy defined by environment</name>
        <url>${env.MAVEN_PROXY_URL}</url>
       </pluginRepository>
      </pluginRepositories>
    </profile>

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


Re: Profile activation via environment?

Posted by Christian Goetze <cg...@miaow.com>.
ossi petz wrote:

> hallo
>
> what is the command line and path you used to fire up maven?
> and where did you put these profiles?

The profiles are in my pom.xml file, and the command line is just plain 
"mvn clean" (or any other target), after setting the MAVEN_PROXY_URL 
environment variable.,

I expected that the activation section would trigger the profile by 
setting the environment variable, but I guess the code that handles 
${env.<var>} is not the same code that handles activations...
--
cg

>
>
>
> Christian Goetze schrieb:
>
>> Why does this not work?
>>
>>    <profile>
>>      <id>proxy</id>
>>
>>      <activation>
>>       <property>
>>        <name>env.MAVEN_PROXY_URL</name>
>>       </property>
>>      </activation>
>>
>>      <repositories>
>>       <repository>
>>        <id>proxy</id>
>>        <name>Maven proxy defined by environment</name>
>>        <url>${env.MAVEN_PROXY_URL}</url>
>>       </repository>
>>      </repositories>
>>
>>      <pluginRepositories>
>>       <pluginRepository>
>>        <id>proxy</id>
>>        <name>Maven proxy defined by environment</name>
>>        <url>${env.MAVEN_PROXY_URL}</url>
>>       </pluginRepository>
>>      </pluginRepositories>
>>    </profile>
>
>
>
> ---------------------------------------------------------------------
> 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: Profile activation via environment?

Posted by ossi petz <os...@hallo.ms>.
hallo

what is the command line and path you used to fire up maven?
and where did you put these profiles?



Christian Goetze schrieb:
> Why does this not work?
> 
>    <profile>
>      <id>proxy</id>
> 
>      <activation>
>       <property>
>        <name>env.MAVEN_PROXY_URL</name>
>       </property>
>      </activation>
> 
>      <repositories>
>       <repository>
>        <id>proxy</id>
>        <name>Maven proxy defined by environment</name>
>        <url>${env.MAVEN_PROXY_URL}</url>
>       </repository>
>      </repositories>
> 
>      <pluginRepositories>
>       <pluginRepository>
>        <id>proxy</id>
>        <name>Maven proxy defined by environment</name>
>        <url>${env.MAVEN_PROXY_URL}</url>
>       </pluginRepository>
>      </pluginRepositories>
>    </profile>


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