mirror of https://github.com/apache/maven.git
[MNG-8368] Fix dependency resolver not using project repositories (#1865)
This commit is contained in:
parent
51123f3abc
commit
62c94d123c
|
@ -167,8 +167,13 @@ public class DefaultDependencyResolver implements DependencyResolver {
|
||||||
InternalSession.from(nonNull(request, "request").getSession());
|
InternalSession.from(nonNull(request, "request").getSession());
|
||||||
DependencyResolverResult result;
|
DependencyResolverResult result;
|
||||||
DependencyResolverResult collectorResult = collect(request);
|
DependencyResolverResult collectorResult = collect(request);
|
||||||
List<RemoteRepository> repositories =
|
List<RemoteRepository> repositories = request.getRepositories() != null
|
||||||
request.getRepositories() != null ? request.getRepositories() : session.getRemoteRepositories();
|
? request.getRepositories()
|
||||||
|
: request.getProject().isPresent()
|
||||||
|
? session.getService(ProjectManager.class)
|
||||||
|
.getRemoteProjectRepositories(
|
||||||
|
request.getProject().get())
|
||||||
|
: session.getRemoteRepositories();
|
||||||
if (request.getRequestType() == DependencyResolverRequest.RequestType.COLLECT) {
|
if (request.getRequestType() == DependencyResolverRequest.RequestType.COLLECT) {
|
||||||
result = collectorResult;
|
result = collectorResult;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue