You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Slawomir Jaranowski (Jira)" <ji...@apache.org> on 2021/04/04 14:47:00 UTC
[jira] [Created] (MNG-7139) Proper verify of plugin configuration
Bean set method call
Slawomir Jaranowski created MNG-7139:
----------------------------------------
Summary: Proper verify of plugin configuration Bean set method call
Key: MNG-7139
URL: https://issues.apache.org/jira/browse/MNG-7139
Project: Maven
Issue Type: Improvement
Components: Integration Tests
Reporter: Slawomir Jaranowski
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)