Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Duplicate
-
Affects Version/s: 2.0.4
-
Fix Version/s: None
-
Component/s: Inheritance and Interpolation
-
Labels:None
-
Complexity:Expert
Description
In my parent POM, in pluginManagement, I have:
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<resource>
<directory>src/webapp</directory>
</resource>
</webResources>
</configuration>
</plugin>
If I run mvn package when at the child module with war packaging, this works fine. But when I run that at the parent module, the src/webapp path is not interpreted as relative to the child module being built, as it should (I think). By comparison, when I configure my source directory, test source directory, or resources in the parent pom using a relative path, they are correctly interpreted as relative to the module being built, regardless of wether I run it from the parent or child module.
As a work-around, I am forced to prefix the relative path with ${basedir}, which should not be necessary.
Issue Links
- duplicates
-
MWAR-79
<webResources> copy fails in a multi-project build
-
I've moved this from MWAR to MNG, as it's a general issue for Maven. We can only align top level plugin configuration, not elements of subclasses (and besides that, I'm not sure if the alignment would be to the pluginManagement or where it is instantiated - that's also worth checking).