Hi,
Just tried out one of my projects with 3.0-beta-1 and discovered an issue
which I would like help on. The issue boils down to "when and how is
targetPath resolved in maven-resources-plugin" in 3.0-beta-1 versus 2.2.1.
I have a bare-bones POM and a couple of text files that can demonstrate
the issue which I can attach to a JIRA (if requested).
My <resources> section looks like:
<resources>
<resource>
<directory>src/main/resources</directory>
<targetPath>../${app.key}</targetPath>
<filtering>true</filtering>
</resource>
</resources>
My plugins section has properties-maven-plugin bringing properties into
the project (only single property app.key). The configuration is as
follows:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<executions>
<execution>
<id>read-project-properties</id>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>src/main/filters/site.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
Finally, my filter section is as follows:
<filters>
<filter>src/main/filters/site.properties</filter>
</filters>
site.properties has only 1 line:
app.key=projectA
So, in maven 2.2.1 (mvn clean process-resources), I am expecting 2 things
(works as expected):
a) contents of src/main/resources should be filtered using site.properties
b) contents of src/main/resources should be copied to target/projectA
In maven 3.0-beta-1, with the same POM and files:
a) contents of src/main/resources are filtered using site.properties
b) *PROBLEM* contents of src/main/resources are copied to
target/${app.key}
If I run maven 3.0-beta-1 with -X switch "mvn -X clean process-resources",
I do see properties-maven-plugin having done its job, as app.key does show
up with value projectA in the "[DEBUG] properties used" line.
Where should I concentrate?
a) maven-3.0-beta-1
b) properties-maven-plugin in conjunction with maven-3.0-beta-1
c) maven-resources-plugin in conjunction with maven-3.0-beta-1
Any help is appreciated.
Thanks,
--
Haroon Rafique
<haroon.rafi...@utoronto.ca>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org