[ http://jira.codehaus.org/browse/MNG-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=152040#action_152040 ]
Maxim Petrashev commented on MNG-3057: -------------------------------------- Hi, Henrik Can you, please, - add supporting of nested values? I mean if we have property: someProperty1=/somepath/somesubpath/${otherPropery2}/something then it will fail with java.lang.IllegalArgumentException: Illegal group reference at java.util.regex.Matcher.appendReplacement(Matcher.java:706) at java.util.regex.Matcher.replaceAll(Matcher.java:806) at java.lang.String.replaceAll(String.java:2000) at org.apache.maven.plugin.install.InstallMojo.insertProperties(InstallMojo.java:118) where my InstallMojo.java:118 line is: s = s.replaceAll("\\$\\{" + key + "\\}", value); - extend mask for "." sign in property names? In you case {myComponent-version} works fine, but {myComponent.version} doesn't work - I see just 1 place for properties replacement: if ( isPomArtifact ) { installer.install( insertProperties(pomFile), artifact, localRepository ); } how about else statement? else { metadata = new ProjectArtifactMetadata( artifact, pomFile ); I believe we have to change it on metadata = new ProjectArtifactMetadata( artifact, insertProperties(pomFile) ); too? - Am I right that we need to extend deploy plugin too to make it configurable for pomFile property? Otherwise, original pom.xml will be deployed, not target/maven-install-plugin/pom.xml Many thanks for your efforts! Does maven team any plans to include this patch in next releases? > properties not expanded in generated POMs when building A/B/C nested projects > ----------------------------------------------------------------------------- > > Key: MNG-3057 > URL: http://jira.codehaus.org/browse/MNG-3057 > Project: Maven 2 > Issue Type: Bug > Components: Inheritance and Interpolation > Affects Versions: 2.0.7 > Reporter: George Armhold > Fix For: 2.0.x > > Attachments: example.tar.gz, generated-poms.tar.gz, > InstallMojo.java.patch, InstallMojo.java.patch > > > Using Maven version: 2.0.8-SNAPSHOT, svn r547427. > I checked out and built 2.0.8 because I was interested in Jason van Zyl's > patch for MNG-2619- "building from the middle pom of a > (parent,child,grandchild) heirarchy fails". The fix works for the most part, > but there still seems to be a problem with the poms that get generated during > the install goal. The poms that get installed into .m2/repository do not > have properties interpolated. If I run maven like: > $ mvn install -Dglobal-version=1.0.0 > I get poms with the string "${global-version}" embedded in the resulting poms > rather than what I specify on the command line (or in settings.xml). The > build works properly aside from this, and if I do "mvn help:effective-pom" > the properties are correctly interpolated. > I've attached a tarfile with an example A/B/C build structure that exhibits > this behavior, as well as the generated poms. > Many thanks for your attention. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira