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

Includes/Excludes within <unpackOptions> are ignored

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2-beta-2
    • 2.2-beta-3
    • None
    • None
    • Maven 2.0.8, Intel Mac 10.5, JDK 5.0
    • Patch

    Description

      I have the following snippet in my assembly descriptor which does not work:

      -snip-
      <moduleSet>
      <includes>
      <include>my:module</include>
      </includes>
      <binaries>
      <unpack>true</unpack>
      <unpackOptions>
      <excludes>
      <exclude>META-INF/**</exclude>
      <exclude>**/.do_not_remove</exclude>
      </excludes>
      </unpackOptions>
      <outputFileNameMapping/>
      <outputDirectory>/</outputDirectory>
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode>
      </binaries>
      </moduleSet>
      -snip-

      Debug output shows:

      -snip-
      [DEBUG] includes:
      */

      [DEBUG] excludes:
      none
      -snip-

      I believe the problem is at line 271/272 of ModuleSetAssemblyPhase (in the 2.2-beta-2 revision, anyway) – it calls "task.setUnpack( binaries.isUnpack() );" but does not set the unpack options (if present), hence they are ignored

      Patch is attached, and works just fine in my case above.

      Attachments

        1. module-set-assembly-phase.patch
          0.8 kB
          Nathaniel Harward

        Activity

          People

            jdcasey John Dennis Casey
            nharward Nathaniel Harward
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: