I am reposting this question to dev list based on a (very) vague
understanding of how it working now:

I see the settings runs through
org.codehaus.plexus.util.interpolation.RegexBasedInterpolator so I think
the answer to my question is that only system properties are available
for variable expansion in the settings files? And properties from an
activated profile would not be?

Also, without really obsorbing the code yet... Would a second round of
processing be a valid enhancement request? 
(In the second round I assume there is a different ValueSource which
would take properties defined by an activated profile?)


> -----Original Message-----
> From: Timothy Reilly 
> Sent: Tuesday, May 22, 2007 5:21 PM
> To: [EMAIL PROTECTED]
> Subject: Settings Variable expansion
> 
> Based on this information 
> http://maven.apache.org/settings.html 
> <http://maven.apache.org/settings.html>  
> <http://maven.apache.org/settings.html 
> <http://maven.apache.org/settings.html> > I thought that 
> variables and variable expansion would be available anywhere 
> in a POM _and_ settings files?
> Is this not the case - is it only pom xml that does expansion?
> <quot>
> They come in five different styles, _all accessible from the 
> settings.xml_ </quot> Currently my settings.xml has: 
> <settings xmlns=http://maven.apache.org/POM/4.0.0
> xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/settings-1.0.0.xsd 
> <http://maven.apache.org/xsd/settings-1.0.0.xsd> "> <profiles>
> <!-- desktop profile -->
> <profile>
> <id>windows</id>
> <activation>
> <activeByDefault>false</activeByDefault>
> <os>
> <family>windows</family>
> </os>
> </activation>
> <properties>
> <environment>UNIT</environment>
> </properties>
> </profile>
> <profile>
> <id>test-resolution</id>
> <activation>
> <activeByDefault>true</activeByDefault>
> </activation>
> <repositories>
> <repository>
> <id>my-unit</id>
> <layout>default</layout>
> <name>my-unit</name>
> <releases>
> <enabled>true</enabled>
> <checksumPolicy>warn</checksumPolicy>
> <updatePolicy>daily</updatePolicy>
> </releases>
> <snapshots>
> <enabled>false</enabled>
> </snapshots>
> <url>
> http://myurl:18080/my/${environment}/release 
> <http://myurl:18080/my/${environment}/release>
> </url>
> </repository>
> </repositories>
> </profile>
> </profiles>
> </settings>
> 
> 
> But help:effective-settings shows the ${environment} isn't expanding.
> <repository>
> <releases>
> <updatePolicy>daily</updatePolicy>
> <checksumPolicy>warn</checksumPolicy>
> </releases>
> <snapshots>
> <enabled>false</enabled>
> </snapshots>
> <id>my-unit</id>
> <name>my-unit</name>
> <url>http://myurl:18080/my/${environment}/release</url>
> </repository>
> 
> Am I doing something incorrectly?
> 
> 
> 

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

Reply via email to