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

Proper verify of plugin configuration Bean set method call

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            sjaranowski Slawomir Jaranowski

            Dates

              Created:
              Updated:

              Slack

                Issue deployment