[ https://issues.apache.org/jira/browse/MNG-7138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17405127#comment-17405127 ]
Slawomir Jaranowski commented on MNG-7138: ------------------------------------------ This feature is also missing in plugin development documentation, like: https://maven.apache.org/guides/plugin/guide-java-plugin-development.html#other-object-classes https://maven.apache.org/guides/mini/guide-configuring-plugins.html#Mapping_Complex_Objects > Proper verify of plugin configuration Bean set method call > ---------------------------------------------------------- > > Key: MNG-7138 > URL: https://issues.apache.org/jira/browse/MNG-7138 > Project: Maven > Issue Type: Improvement > Components: Integration Tests > Reporter: Slawomir Jaranowski > Priority: Major > > When we use custom {{Bean}} as {{plugin}} parameter configuration, {{set}} > method of {{Bean}} is only called for default value. > Example: > {code:java} > public class MyMojo extends AbstractMojo > { > @Parameter > private Bean beanParam; > } > {code} > {code:java} > public class Bean > { > private String field1; > private String field2; > public void set(String value) { > this.field1 = value; > } > } > {code} > > And configuration with fields name: > {code:xml} > <configuration> > <beanParam> > <field1>value1</field1> > <field2>value2</field2> > </beanParam> > </configuration> > {code} > in this case {{Bean.set}} is not called. > > When we have: > {code:xml} > <configuration> > <beanParam>value</beanParam> > </configuration> > {code} > {{Bean.set}} is called. > > I will fix it. -- This message was sent by Atlassian Jira (v8.3.4#803005)