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

Inheritance Error in Object List Configuration for Custom Plugin

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.2.1
    • None
    • None
    • Windows XP SP3, running under Cygwin bash shell

    Description

      When a parent defines an object list in a plugin configuration, and then a child of that parent also defines an object list for the same plugin leaving some values undefined (so as to use defaults), the object list is loaded into the plugin in an unpredictable manner, sometimes using parent-defined properties instead of defaults, and sometimes not.

      The attached plugin/parent/child projects produce this incorrect output:

      $ mvn inherit_bug_demo:bugdemo
      ...
      [INFO] Configuration: [InheritanceBugDemoMojo: objects='[[DemoObject: prop1='Child Object 1 Property 1', prop2='Property 2'], [DemoObject: prop1='Parent Object 1 Property 1', prop2='Child Object 2 Property 2']]']

      The expected output would either be:

      [INFO] Configuration: [InheritanceBugDemoMojo: objects='[[DemoObject: prop1='Child Object 1 Property 1', prop2='Parent Object 1 Property 2'], [DemoObject: prop1='Parent Object 1 Property 1', prop2='Child Object 2 Property 2'], [DemoObject: prop1='Parent Object 3 Property 1', prop2='Parent Object 3 Property 2]]']

      Or:

      [INFO] Configuration: [InheritanceBugDemoMojo: objects='[[DemoObject: prop1='Child Object 1 Property 1', prop2='Property 2'], [DemoObject: prop1='Property 1', prop2='Child Object 2 Property 2']]']

      See attached build log, demonstration plugin, and parent/child project for details.

      Usage:

      $ cd inherit_bug_demo
      $ mvn deploy
      $ cd ../child
      $ mvn inherit_bug_demo:bugdemo

      Attachments

        1. bugdemo.tgz
          3 kB
          Jonathan Pearson
        2. build.log
          4 kB
          Jonathan Pearson

        Issue Links

          Activity

            People

              bentmann Benjamin Bentmann
              celloman Jonathan Pearson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: