gnodet commented on code in PR #117:
URL: 
https://github.com/apache/maven-plugin-tools/pull/117#discussion_r1019359399


##########
maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/util/PluginUtils.java:
##########
@@ -63,7 +63,14 @@ private PluginUtils()
         mavenComponents.put( "org.apache.maven.plugin.MojoExecution", 
"${mojoExecution}" );
         mavenComponents.put( 
"org.apache.maven.plugin.descriptor.PluginDescriptor", "${plugin}" );
         mavenComponents.put( "org.apache.maven.settings.Settings", 
"${settings}" );
-        
+
+        mavenComponents.put( "org.apache.maven.api.Session", "${session}" );
+        mavenComponents.put( "org.apache.maven.api.Project", "${project}" );
+        mavenComponents.put( "org.apache.maven.api.MojoExecution", 
"${mojoExecution}" );
+        // TODO: apiv4: add PluginDescriptor to the api ?
+        //mavenComponents.put( 
"org.apache.maven.api.descriptor.PluginDescriptor", "${plugin}" );
+        mavenComponents.put( "org.apache.maven.api.settings.Settings", 
"${settings}" );

Review Comment:
   Yeah, I was wondering about that as well.  When I added the junit test, I 
copy/pasted an existing one and made sure it was working correcectly.
   However, this is tied to maven itself and the way those 
parameters/components are injected.
   From an API pov, using `@Parameter( property = "${session}" ) Session 
session` is not really intuitive, whereas `@Component Session session` looks 
simplier.



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