Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MJAVADOC-742] Fix resolution of docletArtifacts #186

Merged
merged 4 commits into from Sep 11, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -133,7 +133,6 @@
import org.eclipse.aether.artifact.ArtifactTypeRegistry;
import org.eclipse.aether.artifact.DefaultArtifact;
import org.eclipse.aether.collection.CollectRequest;
import org.eclipse.aether.graph.DefaultDependencyNode;
import org.eclipse.aether.graph.DependencyFilter;
import org.eclipse.aether.resolution.ArtifactRequest;
import org.eclipse.aether.resolution.ArtifactResolutionException;
Expand Down Expand Up @@ -3242,8 +3241,11 @@ private List<String> getArtifactsAbsolutePath(JavadocPathArtifact javadocArtifac

DependencyFilter filter = new ScopeDependencyFilter(
Arrays.asList(Artifact.SCOPE_COMPILE, Artifact.SCOPE_PROVIDED), Collections.emptySet());
DependencyRequest req =
new DependencyRequest(new DefaultDependencyNode(RepositoryUtils.toArtifact(artifact)), filter);
DependencyRequest req = new DependencyRequest(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add an IT for doclets?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feel free to take over the PR, I verified it against the user provided reproducer in MJAVADOC-742

new CollectRequest(
new org.eclipse.aether.graph.Dependency(RepositoryUtils.toArtifact(artifact), null),
RepositoryUtils.toRepos(project.getRemoteArtifactRepositories())),
filter);
Iterable<ArtifactResult> deps =
repoSystem.resolveDependencies(repoSession, req).getArtifactResults();
for (ArtifactResult a : deps) {
Expand Down