[ https://jira.codehaus.org/browse/MNG-5611?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Thornton updated MNG-5611: --------------------------------- Comment: was deleted (was: One line fix to perform interpolation on temporary model (tmpModel) before attempting to read parent from remote repository.) > Project properties are interpolated too late to be used in several parts of > the pom > ----------------------------------------------------------------------------------- > > Key: MNG-5611 > URL: https://jira.codehaus.org/browse/MNG-5611 > Project: Maven 2 & 3 > Issue Type: Bug > Affects Versions: 3.2.1 > Reporter: Robert Thornton > > I need projects that declare my pom as their parent to be able to define > project properties to customize essential components of their build, such as > repositories, pluginRepositories, and distributionManagement. > For example: > {code:xml} > <properties> > <repo.url>http://repo.mysite.com/nexus/content</repo.url> > <repo.releases.enabled>true</repo.releases.enabled> > <repo.snapshots.enabled>false</repo.snapshots.enabled> > <repo.update>daily</repo.update> > </properties> > <repositories> > <repository> > <id>my-repo</id> > <name>My Repository</name> > <url>${repo.url}/groups/main-repo</url> > <releases> > <enabled>${repo.releases.enabled}</enabled> > <updatePolicy>${repo.update}</updatePolicy> > </releases> > <snapshots> > <enabled>${repo.snapshots.enabled}</enabled> > <updatePolicy>${repo.update}</updatePolicy> > </snapshots> > </repository> > </repositories> > <pluginRepositories> > <pluginRepository> > <id>my-plugin-repo</id> > <name>My Plugin Repository</name> > <url>${repo.url}/groups/plugin-repo</url> > <releases> > <enabled>${repo.releases.enabled}</enabled> > <updatePolicy>${repo.update}</updatePolicy> > </releases> > <snapshots> > <enabled>${repo.snapshots.enabled}</enabled> > <updatePolicy>${repo.update}</updatePolicy> > </snapshots> > </pluginRepository> > </pluginRepositories> > {code} > The bug is that the effective pom correctly shows these properties as being > interpolated for the above repositories, however the Aether RemoteRepository > objects for the above definitions are created before the pom's properties are > interpolated. This results in unexpected behavior that can only be understood > by attaching a debugger to the Maven build process. The above example fails, > for example, if the above pom's parent is in the repository whose properties > haven't been interpolated yet. > The way I believe the properties interpolation process should work is that > any time a project property is requested (as in the above examples), it > should be interpolated based on the currently available project properties > even if the entire project hierarchy has not yet been loaded. -- This message was sent by Atlassian JIRA (v6.1.6#6162)