On Wednesday 06 May 2015 16:19:31 Robert Munteanu wrote:
> Hi,
> 
> I noticed that we are not consistent in setting parent.relativePath on
> pom.xml files. Some modules set it to the empty value, e.g.
> 
>     <parent>
>         <groupId>org.apache.sling</groupId>
>         <artifactId>sling</artifactId>
>         <version>22</version>
>         <relativePath />
>     </parent>
> 
> while others set it to the relative path of the parent module in the
> SVN checkout
> 
>     <parent>
>         <groupId>org.apache.sling</groupId>
>         <artifactId>sling</artifactId>
>         <version>22</version>
>         <relativePath>../../parent/pom.xml</relativePath>
>     </parent>
> 
> We also had a query from Sandro on the users@sling [1] which leads me
> to believe that different Maven versions handle this property
> differently. While older versions, like we have on Jenkins, prefer the
> groupId/artifactId/version coordinates defined in the pom, more recent
> versions pick up a pom from the relativePath even if the version does
> not match.
> 
> To ensure that we get reproducible builds and since we expect to
> always deploy the parent pom in a Maven repository I propose that we
> should always set the relativePath to be empty.
> 
> Thoughts?

+1 though you have to build parent yourself when SNAPSHOT is used by that 
module

Can we add such "best practices" to our documentation, please?

Regards,
O.

> Cheers,
> 
> Robert
> 
> 
> [1]:
> http://sling-users.markmail.org/search/?q=#query:+page:2+mid:qk3ydifmrkyxbx
> cp+state:results


Reply via email to