Uploaded image for project: 'Maven Assembly Plugin'
  1. Maven Assembly Plugin
  2. MASSEMBLY-222

2.2-beta-1 regression in assembly descriptor interpolation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.2-beta-1
    • 2.2-beta-2
    • None
    • None

    Description

      I have found a significant change in behaviour between 2.1 and 2.2-beta-1, using the following assembly descriptor:

      <assembly>
        <id>dist</id>
        <formats>
          <format>tar.gz</format>
        </formats>
        <includeBaseDirectory>no</includeBaseDirectory>
        <fileSets>
          <fileSet>
            <outputDirectory>/foobar-${version}</outputDirectory>
            <includes>
              <include>README.txt</include>
              <include>changelog.txt</include>
              <include>java.policy</include>
            </includes>
          </fileSet>
          <fileSet>
            <directory>target</directory>
            <outputDirectory>/foobar-${version}/jars</outputDirectory>
            <includes>
              <include>foobar-${version}.jar</include>
            </includes>
          </fileSet>
          <fileSet>
            <directory>src/main/scripts</directory>
            <outputDirectory>/foobar-${version}/bin</outputDirectory>
            <fileMode>0755</fileMode>
          </fileSet>
        </fileSets>
        <dependencySets>
          <dependencySet>
            <outputDirectory>/foobar-${version}/jars</outputDirectory>
            <unpack>false</unpack>
          </dependencySet>
        </dependencySets>
      </assembly>
      

      Using 2.1, ${version} interpolates with the version of the project being assembled.

      Using 2.2-beta-1, the ${version} in the <dependencySet> interpolates with the version of each individual dependency, leading to the <depenencySet> being scattered across many directories.

      Attachments

        Activity

          People

            jdcasey John Dennis Casey
            maxb Max Oliver Bowsher
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: