[ http://jira.codehaus.org/browse/MRESOURCES-118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dennis Lundberg updated MRESOURCES-118: --------------------------------------- Component/s: interpolation > ${project.dependencies[0].artifactId} is not expanded by resource filtering > --------------------------------------------------------------------------- > > Key: MRESOURCES-118 > URL: http://jira.codehaus.org/browse/MRESOURCES-118 > Project: Maven 2.x Resources Plugin > Issue Type: Bug > Components: interpolation > Affects Versions: 2.3, 2.4, 2.4.1 > Environment: Maven 2.2.1, Ubuntu 9.10, Java 6u16 > Reporter: Pascal Thivent > Priority: Minor > Attachments: maven-resources-filtering-testcase.tar.bz2 > > > When filtering resources, ${project.dependencies[0].artifactId} is not > expanded (remains unchanged in the output file). > I've tried to define a property in my pom to workaround this issue: > <properties> > <myartifact>${project.dependencies[0].artifactId}</myartifact> > </properties> > But, still, filtering the following file: > {code:xml} > <somenode> > <fileName>${project.dependencies[0].artifactId}</fileName> > <fileName>${myartifact}</fileName> > </somenode> > {code} > Produces the following unexpected result: > {code:xml} > <somenode> > <fileName>${project.dependencies[0].artifactId}</fileName> > <fileName>${project.dependencies[0].artifactId}</fileName> > </somenode> > {code} > The only working workaround I've found is to use the antrun plugin: > {code:xml} > <plugin> > <artifactId>maven-antrun-plugin</artifactId> > <executions> > <execution> > <phase>process-resources</phase> > <configuration> > <tasks> > <echo>${project.dependencies[0].artifactId}</echo> > <echo>${artifactId}</echo> > <replace file="${project.build.outputDirectory}/my.xml" token="@@@" > value="${project.dependencies[0].artifactId}"/> > </tasks> > </configuration> > <goals> > <goal>run</goal> > </goals> > </execution> > </executions> > </plugin> > {code} > I didn't test all cases but this problem may affect all "indexed" properties > (as defined in PLXUTILS-37). > I'm attaching a sample project demonstrating this problem. -- 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