+1, more information is also available at 
https://jira.codehaus.org/browse/MNG-4687 and indeed Maven seems to prefer 
local resolution in cases where the relativePath is not set explicitly empty!
Konrad

> Am 06.05.2015 um 15:19 schrieb Robert Munteanu <romb...@apache.org>:
> 
> 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?
> 
> Cheers,
> 
> Robert
> 
> 
> [1]: 
> http://sling-users.markmail.org/search/?q=#query:+page:2+mid:qk3ydifmrkyxbxcp+state:results

Reply via email to