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

Improve plugin configuration property merge algorithm

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0-alpha-3
    • 2.0-beta-1
    • Plugins and Lifecycle
    • None

    Description

      If the property are the same in the parent and the child project, then the parent property is not inherited. This is fine for simple properties but breaks for complex properties such as lists. Here's an example:

      My parent POM:

      <build>
      <pluginManagement>
      <plugins>
      <plugin>
      <artifactId>maven-surefire-plugin</artifactId>
      <configuration>
      <systemProperties>

      <property>
      <name>cargo.resin3x.port</name>
      <value>8280</value>
      </property>
      <property>
      <name>cargo.resin3x.url</name>
      <value>http://www.caucho.com/download/resin-3.0.9.zip</value>
      </property>

      </systemProperties>
      </configuration>
      </plugin>
      </plugins>
      </pluginManagement>
      </build>

      My child POM:

      <build>
      <plugins>
      <plugin>
      <artifactId>maven-surefire-plugin</artifactId>
      <configuration>
      <systemProperties>

      <!-- Default list of containers to run on. If you want to shorten or change the
      execution of 'samples', simply specify a shorter list of containers on the
      command line or in your settings -->
      <property>
      <name>cargo.containers</name>
      <value>resin3x, orion2x, tomcat5x, jetty4xEmbedded</value>
      </property>

      <!-- Location where to download and install the containers for the tests -->
      <property>
      <name>cargo.install.dir</name>
      <value>${basedir}/../../target/installs</value>
      </property>

      </systemProperties>
      </configuration>
      </plugin>
      </plugins>
      </build>

      It sounds a reasonable expectations that the system properties will get merged.

      Attachments

        Issue Links

        Activity

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

          People

            jdcasey John Dennis Casey
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 3h
                3h
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h Time Not Required
                2h

                Slack

                  Issue deployment