Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-7138

Proper verify of plugin configuration Bean set method call

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Integration Tests
    • None

    Description

      When we use custom Bean as plugin parameter configuration, set method of Bean is only called for default value.

      Example:

      public class MyMojo extends AbstractMojo
      {
         @Parameter
          private Bean beanParam;
      }
      
      public class Bean
      {
         private String field1;
         private String field2;
      
         public void set(String value) {
            this.field1 = value;
         }
      }
      

       
      And configuration with fields name:

      <configuration>
         <beanParam>
          <field1>value1</field1>
          <field2>value2</field2>
        </beanParam>
      </configuration>
      

      in this case Bean.set is not called.

       

      When we have:

      <configuration>
         <beanParam>value</beanParam>
      </configuration>
      

      Bean.set is called.

       

      I will fix it.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sjaranowski Slawomir Jaranowski
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: