Adding managed dependencies when resolving provider artifacts (#30442)

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
This commit is contained in:
Pedro Igor 2024-06-14 11:10:45 -03:00 committed by GitHub
parent ece72cd491
commit fa5bb72069
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -59,7 +59,9 @@ public final class Maven {
new ArtifactDescriptorRequest()
.setArtifact(new DefaultArtifact(project.getGroupId(), project.getArtifactId(), "pom", project.getVersion()))
.setRepositories(remoteRepositories));
Artifact artifact = resolveArtifact(groupId, artifactId, projectDescriptor.getDependencies());
List<Dependency> dependencies = new ArrayList<>(projectDescriptor.getDependencies());
dependencies.addAll(projectDescriptor.getManagedDependencies());
Artifact artifact = resolveArtifact(groupId, artifactId, dependencies);
if (artifact == null) {
resolveArtifact(groupId, artifactId, projectDescriptor.getManagedDependencies());
@ -130,4 +132,4 @@ public final class Maven {
return artifactResults.get(0).getArtifact();
}
}
}