Re: Property interpolation in child pom

2016-08-25 Thread Stephen Connolly
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  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. something. So
> the fact that you are using a property ${site.url} intended to fill in a
> section ... 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  > wrote:
>
> > 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.
> >
> > 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";>
> >   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
> >
> >
>


-- 
Sent from my phone


Re: Property interpolation in child pom

2016-08-24 Thread Curtis Rueden
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. something. So
the fact that you are using a property ${site.url} intended to fill in a
section ... 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  wrote:

> 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.
>
> 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";>
>   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
>
>