slawekjaranowski commented on code in PR #171:
URL: 
https://github.com/apache/maven-plugin-tools/pull/171#discussion_r1017181479


##########
maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/DefaultMojoAnnotationsScanner.java:
##########
@@ -85,12 +87,18 @@ public Map<String, MojoAnnotatedClass> scan( 
MojoAnnotationsScannerRequest reque
             for ( Artifact dependency : request.getDependencies() )
             {
                 scan( mojoAnnotatedClasses, dependency.getFile(), 
request.getIncludePatterns(), dependency, true );
+                if ( request.getMavenApiVersion() == null
+                     && dependency.getFile().getName().contains( 
"maven-plugin-api" ) )
+                {
+                    request.setMavenApiVersion( getSpecificationVersionOfJar( 
dependency.getFile() ) );
+                }

Review Comment:
   ok, other question
   
   why not use 
   
   ```
                   dependency.getArtifactId();
                   dependency.getVersion();
   ```
   
   instead of checking artifact file name and next read content from artifact 
manifest.
   



-- 
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