[
https://issues.apache.org/jira/browse/MPLUGIN-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17631791#comment-17631791
]
ASF GitHub Bot commented on MPLUGIN-441:
----------------------------------------
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.
> Support mojos using the new maven v4 api
> ----------------------------------------
>
> Key: MPLUGIN-441
> URL: https://issues.apache.org/jira/browse/MPLUGIN-441
> Project: Maven Plugin Tools
> Issue Type: New Feature
> Reporter: Guillaume Nodet
> Priority: Major
> Fix For: 4.0.0
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)