Some of those properties are "magic" ones where if you inherit from parent and do not override then the child's artifactId will be appended.
I am not 100% certain but IIRC the appending may be controlled by the parent's url ending or not ending with a trailing / but this may not be universal and may only be for some of them On Wednesday 24 August 2016, Curtis Rueden <ctrue...@wisc.edu> wrote: > Hi Michael, > > Just a shot in the dark, but Maven properties of the form ${a.b.c} are > generally shorthand for XML data i.e. <a><b><c>something</c></b></a>. So > the fact that you are using a property ${site.url} intended to fill in a > section <site><url>...</url></site> is perhaps of concern. Did you try > changing your property names to see whether that makes a difference? If it > does not matter, then (from my non-expert perspective) I am inclined to > agree this seems like a defect, and you could file an issue in JIRA. > > Regards, > Curtis > > > > -- > Curtis Rueden > LOCI software architect - http://loci.wisc.edu/software > ImageJ2 lead, Fiji maintainer - http://imagej.net/User:Rueden > Did you know ImageJ has a forum? http://forum.imagej.net/ > > > On Wed, Aug 10, 2016 at 11:58 PM, Michael <mlgir...@gmail.com > <javascript:;>> wrote: > > > I wish to define the distributionManagement values for all my projects in > > a common parent pom. > > > > parent pom.xml > > > > <url>${site.url}</url> > > > > <properties> > > <site.base.url>file:///Users/macuser/Sites</site.base.url> > > <site.url>${site.base.url}/${project.artifactId}</site.url> > > </properties> > > > > <distributionManagement> > > <site> > > <id>local</id> > > <url>${site.url}</url> > > </site> > > </distributionManagement> > > > > > > The effective pom for this is as expected: > > > > <url>file:///Users/macuser/Sites/parent-pom</url> > > <distributionManagement> > > <site> > > <id>local</id> > > <url>file:///Users/macuser/Sites/parent-pom</url> > > </site> > > </distributionManagement> > > <properties> > > <site.base.url>file:///Users/macuser/Sites</site.base.url> > > <site.url>file:///Users/macuser/Sites/parent-pom</site.url> > > </properties> > > > > > > In child pom, I specify the parent pom only, no other elements. I expect > > the distributionManagement to inherit from the parent. > > > > <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi=" > > http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:// > > maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> > > <modelVersion>4.0.0</modelVersion> > > <parent> > > <groupId>mlgiroux</groupId> > > <artifactId>parent-pom</artifactId> > > <version>0.0.1-SNAPSHOT</version> > > <relativePath></relativePath> > > </parent> > > <artifactId>parent-pom-test</artifactId> > > <packaging>pom</packaging> > > </project> > > > > The effective pom is strange: > > > > <url>file:///Users/macuser/Sites/parent-pom-test/parent-pom-test</url> > > <distributionManagement> > > <site> > > <id>local</id> > > <url>file:///Users/macuser/Sites/parent-pom-test/parent- > > pom-test</url> > > </site> > > </distributionManagement> > > <properties> > > <site.base.url>file:///Users/macuser/Sites</site.base.url> > > <site.url>file:///Users/macuser/Sites/parent-pom-test</site.url> > > </properties> > > > > The site.url property has been resolved as I expected, but the <url> > > 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: > > <url>${site.url}</url> > > > > <distributionManagement> > > <site> > > <id>local</id> > > <url>${site.url}</url> > > </site> > > </distributionManagement> > > > > > > The effective pom is exactly as I expect with the artifactId specified > > exactly once in the effective values. > > > > <url>file:///Users/macuser/Sites/parent-pom-test</url> > > <distributionManagement> > > <site> > > <id>local</id> > > <url>file:///Users/macuser/Sites/parent-pom-test</url> > > </site> > > </distributionManagement> > > > > > > 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 > > > > > -- Sent from my phone