Hi Guillaume,
I removed it because I assumed that the RepositorySession is already aware
of the RemoteRepositories.
All integration tests kept working after this change.
But it seems like you found a case where it is required.
So you can write an integration test to prevent regression in the future
and restore this part of the code.
thanks,
Robert
On Wed, 10 Aug 2016 20:42:48 +0200, Guillaume Boué <gb...@apache.org>
wrote:
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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org