michael-o commented on code in PR #201:
URL: 
https://github.com/apache/maven-plugin-tools/pull/201#discussion_r1167578171


##########
maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor.java:
##########
@@ -570,19 +572,18 @@ protected void extendJavaProjectBuilderWithSourcesJar(
             JavaProjectBuilder builder, Artifact artifact, PluginToolsRequest 
request, String classifier)
             throws ExtractionException {
         try {
-            Artifact sourcesArtifact = 
repositorySystem.createArtifactWithClassifier(
+            org.eclipse.aether.artifact.Artifact sourcesArtifact = new 
DefaultArtifact(
                     artifact.getGroupId(),
                     artifact.getArtifactId(),
-                    artifact.getVersion(),
+                    classifier,
                     artifact.getType(),
-                    classifier);
-
-            ArtifactResolutionRequest req = new ArtifactResolutionRequest();
-            req.setArtifact(sourcesArtifact);
-            req.setLocalRepository(request.getLocal());
-            req.setRemoteRepositories(request.getRemoteRepos());
-            ArtifactResolutionResult res = repositorySystem.resolve(req);
-            if (res.hasMissingArtifacts() || res.hasExceptions()) {
+                    artifact.getVersion());
+
+            ArtifactRequest resolveRequest = new 
ArtifactRequest(sourcesArtifact, request.getRemoteRepos(), null);

Review Comment:
   No `ArtifactHandler` required?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to