Skip to content
Permalink
Browse files
Update to use all the various repositories for resolving extensions
  • Loading branch information
dkulp committed Sep 15, 2014
1 parent 640012a commit 85252a559cdc97a7fb98cd47954de433904d26ac
Showing 1 changed file with 7 additions and 1 deletion.
@@ -31,6 +31,7 @@

import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.DependencyResolutionRequiredException;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
import org.apache.maven.execution.MavenSession;
@@ -261,7 +262,12 @@ private List<File> resolve(String artifactDescriptor) {
request.setMirrors(session.getRequest().getMirrors());
request.setProxies(session.getRequest().getProxies());
request.setLocalRepository(session.getLocalRepository());
request.setRemoteRepositories(session.getRequest().getRemoteRepositories());
List<ArtifactRepository> r = new ArrayList<ArtifactRepository>();
r.addAll(project.getPluginArtifactRepositories());
r.addAll(project.getRemoteArtifactRepositories());
r.addAll(session.getRequest().getRemoteRepositories());
r.addAll(session.getRequest().getPluginArtifactRepositories());
request.setRemoteRepositories(r);
ArtifactResolutionResult result = repository.resolve(request);
List<File> files = new ArrayList<File>();
for (Artifact a : result.getArtifacts()) {

0 comments on commit 85252a5

Please sign in to comment.