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

[regression] Collection entries of unequal types are reordered in plugin configuration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0-alpha-1
    • 3.0-alpha-1
    • POM
    • None

    Description

      It seems that the modelproperty sorting is a bit overzealous. Configure e.g. the exec-maven-plugin thusly:

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <configuration>
          <executable>echo</executable>
          <arguments>
            <argument>foo</argument>
            <classpath/>
            <argument>bar</argument>
          </arguments>
        </configuration>
      </plugin>
      

      With Maven 2.0.9 I get the expected output

      [INFO] [exec:exec]
      [INFO] foo /home/espenhw/tmp/target/classes bar
      

      While with 3.0-SNAPSHOT I get

      [INFO] [exec:exec]
      [INFO] foo bar /home/espenhw/tmp/target/classes
      

      This breaks the common use case of

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <configuration>
          <executable>java</executable>
          <arguments>
            <argument>-cp</argument>
            <classpath/>
            <argument>my.app.MainClass</argument>
          </arguments>
        </configuration>
      </plugin>
      

      Attachments

        Activity

          People

            bentmann Benjamin Bentmann
            espenhw Espen Wiborg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: