[ 
https://issues.apache.org/jira/browse/MNG-5527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15738331#comment-15738331
 ] 

Hudson commented on MNG-5527:
-----------------------------

SUCCESS: Integrated in Jenkins build maven-3.x #1424 (See 
[https://builds.apache.org/job/maven-3.x/1424/])
[MNG-5527] Dependency management import should support relocations. (schulte: 
rev ef4e4b4d826d60527dc8372501fbef9e3dcaf648)
* (edit) 
maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java


> Dependency management import should support relocations.
> --------------------------------------------------------
>
>                 Key: MNG-5527
>                 URL: https://issues.apache.org/jira/browse/MNG-5527
>             Project: Maven
>          Issue Type: Bug
>          Components: Dependencies
>         Environment: maven-3.1.0
> Fedora 18 x86_64
>            Reporter: Matous Jobanek
>            Assignee: Christian Schulte
>             Fix For: 3.4.0
>
>
> Consider the following scenario:
> {code:xml}
> <project>
>     <modelVersion>4.0.0</modelVersion>
>     <groupId>old.groupId.bom</groupId>
>     <artifactId>my-artifactId-bom</artifactId>
>     <version>1.0</version>
>     <packaging>pom</packaging>
>     <distributionManagement>
>         <relocation>
>             <groupId>new.groupId.bom</groupId>
>             <artifactId>my-artifactId-bom</artifactId>
>             <version>2.0</version>
>         </relocation>
>     </distributionManagement>
> </project>
> {code}
> {code:xml}
> <project>
>     <modelVersion>4.0.0</modelVersion>
>     <groupId>my.project.groupId</groupId>
>     <artifactId>my-project</artifactId>
>     <version>1.0</version>
>     <packaging>war</packaging>
>     <dependencyManagement>
>         <dependencies>
>             <dependency>
>                 <groupId>old.groupId.bom</groupId>
>                 <artifactId>my-artifactId-bom</artifactId>
>                 <version>1.0</version>
>                 <type>pom</type>
>                 <scope>import</scope>
>             </dependency>
>         </dependencies>
>     </dependencyManagement>
>     ...
> </project>
> {code}
> The expected result according to [1]:
> During building the "my-project" it should print the WARNING with the 
> information about the relocation and it should be automatically redirected 
> from old.groupId.bom:my-artifactId-bom:1.0 to 
> new.groupId.bom:my-artifactId-bom:2.0 and use dependencies from the new pom.
> Actual results:
> There is no WARNING and no redirection to the new pom and maven is trying to 
> obtain dependencies from the old pom (old.groupId.bom:my-artifactId-bom:1.0). 
>  
> Nevertheless, when the pom is declared as a "normal dependency" (not in the 
> "dependencyManagement" part) it works without any problem - it prints the 
> WARNING and redirects to the new pom, but this is not the case we are using.
> [1] http://maven.apache.org/guides/mini/guide-relocation.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to