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

Kenneth Knowles commented on MDEP-592:
--------------------------------------

I can't edit this, but someone should add all the versions up to 3.1.2 to the 
"Affects Versions" field.

> Regression: -Dmdep.addParentPoms=true causes <repositories> to be ignored
> -------------------------------------------------------------------------
>
>                 Key: MDEP-592
>                 URL: https://issues.apache.org/jira/browse/MDEP-592
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>          Components: copy-dependencies
>    Affects Versions: 3.0.0, 3.0.1, 3.0.2
>         Environment: Apache Maven 3.5.2 
> (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T09:58:13+02:00)
> Java version: 1.8.0_111, vendor: Oracle Corporation
>            Reporter: Andreas Sewe
>            Priority: Major
>
> This works with version 2.10, but fails with 3.0.2.
> Taken the following {{pom.xml}} of a small, standalone project:
> {noformat}
> <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>
>     <groupId>org.example</groupId>
>     <artifactId>test</artifactId>
>     <version>0.0.1-SNAPSHOT</version>
>     <repositories>
>         <repository>
>             <id>spring-milestones</id>
>             <name>Spring Milestones</name>
>             <url>https://repo.spring.io/libs-milestone</url>
>             <snapshots>
>                 <enabled>false</enabled>
>             </snapshots>
>         </repository>
>     </repositories>
>     <dependencies>
>         <dependency>
>             <groupId>org.springframework.shell</groupId>
>             <artifactId>spring-shell-starter</artifactId>
>             <version>2.0.0.M2</version>
>         </dependency>
>     </dependencies>
> </project>
> {noformat}
> The following command fails:
> {noformat}
> > mvn clean 
> > org.apache.maven.plugins:maven-dependency-plugin:3.0.2:copy-dependencies 
> > -Dmdep.addParentPoms=true
> …
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-dependency-plugin:3.0.2:copy-dependencies 
> (default-cli) on project test: Error resolving project artifact: Failure to 
> find org.springframework.shell:spring-shell-starter:pom:2.0.0.M2 in 
> http://uk.maven.org/maven2 was cached in the local repository, resolution 
> will not be reattempted until the update interval of uk.maven.org has elapsed 
> or updates are forced for project 
> org.springframework.shell:spring-shell-starter:jar:2.0.0.M2 -> [Help 1]
> {noformat}
> Dropping the {{-Dmdep.addParentPoms=true}} causes the resolution failure to 
> disappear, with {{spring-shell-starter-2.0.0.M2.jar}} downloading just fine:
> {noformat}
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Building test 0.0.1-SNAPSHOT
> [INFO] 
> ------------------------------------------------------------------------
> Downloading from spring-milestones: 
> https://repo.spring.io/libs-milestone/org/springframework/shell/spring-shell-starter/2.0.0.M2/spring-shell-starter-2.0.0.M2.pom
> Downloaded from spring-milestones: 
> https://repo.spring.io/libs-milestone/org/springframework/shell/spring-shell-starter/2.0.0.M2/spring-shell-starter-2.0.0.M2.pom
>  (1.4 kB at 1.2 kB/s)
> Downloading from spring-milestones: 
> https://repo.spring.io/libs-milestone/org/springframework/shell/spring-shell-parent/2.0.0.M2/spring-shell-parent-2.0.0.M2.pom
> Downloaded from spring-milestones: 
> https://repo.spring.io/libs-milestone/org/springframework/shell/spring-shell-parent/2.0.0.M2/spring-shell-parent-2.0.0.M2.pom
>  (7.4 kB at 22 kB/s)
> Downloading from spring-milestones: 
> https://repo.spring.io/libs-milestone/org/springframework/boot/spring-boot-starter-parent/1.3.0.RELEASE/spring-boot-starter-parent-1.3.0.RELEASE.pom
> …
> {noformat}
> But of course, this doesn’t download the parent POMs.
> Using version 2.10 works, however.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to