[ https://issues.apache.org/jira/browse/MPLUGIN-495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17803929#comment-17803929 ]
ASF GitHub Bot commented on MPLUGIN-495: ---------------------------------------- michael-o commented on PR #253: URL: https://github.com/apache/maven-plugin-tools/pull/253#issuecomment-1880017150 > Sorry for the late intervention. I'm not completely sure about discouraging the use of ${project.xxx} expressions. The reason is that they may be needed to understand what the exact input is for a given plugin and to find if the input has changed. This may be used by maven build cache extension, and this may be also used in the future if we can actually come up with an incremental build context api. If plugins are only injected with the project, any change to it may cause a rebuild or cache miss. Both will continue to work, but if that is your concern can you file an issue regarding this, so it is not forgotten? > WARNINGs based on usage of @Component for MavenSession/MavenProject instead > of @Parameter > ----------------------------------------------------------------------------------------- > > Key: MPLUGIN-495 > URL: https://issues.apache.org/jira/browse/MPLUGIN-495 > Project: Maven Plugin Tools > Issue Type: Improvement > Affects Versions: 3.10.2 > Reporter: Karl Heinz Marbaise > Assignee: Michael Osipov > Priority: Critical > Fix For: 3.11.0 > > > A change of parameters like this: > {code:java} > @Parameter(defaultValue = "${project}", readonly = true, required = true) > {code} > into: > {code:java} > @Component > {code} > This will result in WARNINGs like this: > {code} > Warning: Deprecated @Component annotation for 'session' field in > org.apache.maven.plugins.dependency.GetMojo: replace with @Parameter( > defaultValue = "${session}", readonly = true ) > {code} > The shown deprecation message is wrong. It is fine to use that for components > to be injected. -- This message was sent by Atlassian Jira (v8.20.10#820010)