[ 
https://issues.apache.org/jira/browse/MPLUGIN-419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17620555#comment-17620555
 ] 

ASF GitHub Bot commented on MPLUGIN-419:
----------------------------------------

gnodet commented on PR #151:
URL: 
https://github.com/apache/maven-plugin-tools/pull/151#issuecomment-1284497850

   > > Looks good (apart from the very minor indentation issue). Some of it had 
already been integrated in the v4 api through 
[gnodet/maven@6317b8c](https://github.com/gnodet/maven/commit/6317b8c0ad468a4abdee47531d461755ff051d0a),
 but both `@Parameter` and `@Component` annotations were actually modified. 
Does it make sense or should I revert the changes on `@Component` ?
   > 
   > We can add support for `@Compoent` with method in next step. I must check 
if old `@Compoent` can be injected by method - maybe you know it.
   
   I don't think so at the moment.  The question is more whether sisu-inject 
supports injecting components using setters, but I would think so.
   
   > I hope we can also add support for old and new annotation together. As 
soon Maven 4 alpha will be published we will have open way for it.
   
   That's done in https://github.com/apache/maven-plugin-tools/pull/117 . Both 
annotation packages are supported.    It's ready for review (may need to rebase 
based on recent changes), but I think it would be better in a new major version 
of the plugin tools.
   




> Allow @Parameter on setters methods
> -----------------------------------
>
>                 Key: MPLUGIN-419
>                 URL: https://issues.apache.org/jira/browse/MPLUGIN-419
>             Project: Maven Plugin Tools
>          Issue Type: New Feature
>            Reporter: Slawomir Jaranowski
>            Assignee: Slawomir Jaranowski
>            Priority: Major
>
> We needn't filed for Mojo parameters.
> When setters method exist it is called first by Maven.
> We can declare Mojo as:
> {code:java}
> @Mojo( name = "my-mojo" )
> public class MyMojo extends AbstractMojo
> {
>     @Parameter
>     private String param;
>     public void execute()
>     {
>     }
> }
> {code}
> In some case will be useful to have possibility to declare as:
> {code:java}
> @Mojo( name = "my-mojo" )
> public class MyMojo extends AbstractMojo
> {
>     @Parameter
>     public void setParam(String param)
>     {
>         // do something with param
>     }
>     public void execute()
>     {
>     }
> }
> {code}
> eg, useful:
> - normalization 
> - validation
> - split one input value to more items, the same or other type



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to