Hello,

 

In the current 3.0.0-SNAPSHOT version of the maven-dependency-plugin, I noticed 
that the unpack and copy goals do not resolve artifacts from remote 
repositories configured in the POM. This used to work in the version 2.10.

 

To reproduce the issue, it is possible to add a remote repo in a sample POM 
file:

 

    
        
            netbeans
            http://bits.netbeans.org/nexus/content/groups/netbeans/
        
    



And then configure the Dependency Plugin to unpack, for example, the artifact 
org.netbeans.modules:org-netbeans-core:RELEASE81:nbm. The build fails in 
version 3.0.0-SNAPSHOT of the plugin because the new netbeans repo isn't taken 
into account, whereas the artifact is correctly downloaded if version 2.10 is 
used. Furthermore, if the repository declaration is moved to the Settings, 
instead of being in the POM, the repo is correctly taken into account for both 
versions.

 

After looking at the history, it seems to have been removed by this commit:

 

https://github.com/apache/maven-plugins/commit/35b9283efa241809a59fb4a828308681fb4a2afe#diff-870eb62b4a419b584383325fa9296a08

 

where the following line was removed: buildingRequest.setRemoteRepositories( 
getRemoteRepos() );

 

Was this intended? If so, we should update the docs to reflect this change, I 
didn't find a change regarding this.


 

I re-added it locally, with the remote repositories being injected in the 
plugin with the "project.remoteArtifactRepositories" property, and it solves 
this issue: the repositories declared in the POM are used, alongside those 
declared in the Settings, like usual. All the ITs still pass also.


 

Thanks,


Guillaume


 

Reply via email to