I wish to define the distributionManagement values for all my projects in a common parent pom.
parent pom.xml
${site.url}
file:///Users/macuser/Sites
${site.base.url}/${project.artifactId}
local
${site.url}
The effective pom for this is as expected:
file:///Users/macuser/Sites/parent-pom
local
file:///Users/macuser/Sites/parent-pom
file:///Users/macuser/Sites
file:///Users/macuser/Sites/parent-pom
In child pom, I specify the parent pom only, no other elements. I expect the distributionManagement to inherit from the parent.
4.0.0
mlgiroux
parent-pom
0.0.1-SNAPSHOT
parent-pom-test
pom
The effective pom is strange:
file:///Users/macuser/Sites/parent-pom-test/parent-pom-test
local
file:///Users/macuser/Sites/parent-pom-test/parent-pom-test
file:///Users/macuser/Sites
file:///Users/macuser/Sites/parent-pom-test
The site.url property has been resolved as I expected, but the elements for project.url and distributionManagement.site.url that were defined in the parent as ${site.url} have the artifactId twice. As if I had specified ${site.base.url}/${project.artifactId}/${project.artifactId}
Now, if I add the url and distributionManagement to the child pom as:
${site.url}
local
${site.url}
The effective pom is exactly as I expect with the artifactId specified exactly once in the effective values.
file:///Users/macuser/Sites/parent-pom-test
local
file:///Users/macuser/Sites/parent-pom-test
I think it is important to point out that the child is NOT a sub module of the parent. It specifies a parent, but it is itself a root module.
This feels like a defect to me.
Michael Giroux