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());
|
||||
DependencyResolverResult result;
|
||||
DependencyResolverResult collectorResult = collect(request);
|
||||
List<RemoteRepository> repositories =
|
||||
request.getRepositories() != null ? request.getRepositories() : session.getRemoteRepositories();
|
||||
List<RemoteRepository> repositories = request.getRepositories() != null
|
||||
? request.getRepositories()
|
||||
: request.getProject().isPresent()
|
||||
? session.getService(ProjectManager.class)
|
||||
.getRemoteProjectRepositories(
|
||||
request.getProject().get())
|
||||
: session.getRemoteRepositories();
|
||||
if (request.getRequestType() == DependencyResolverRequest.RequestType.COLLECT) {
|
||||
result = collectorResult;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue