gnodet commented on code in PR #117:
URL:
https://github.com/apache/maven-plugin-tools/pull/117#discussion_r1019394322
##########
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:
Also, I don't think the use of `@Parameter` or `@Component` should be
dictated by the implementation. For example, the maven session is available as
both a parameter injected by the plugin manager and a sisu bean inside the
`@SessionScope`. Also `@Component` relates to the sisu components, but this
does not have to be made explicit.
I would personally favor the `@Component` approach for everything that does
not come from the configuration.
--
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]