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

dependencySet "include" seems to implicitly append wildcards to simple groupId:artifactId values

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.6, 3.0.0, 3.1.0
    • Fix Version/s: None
    • Component/s: dependencySet
    • Labels:
      None

      Description

      When a multi-module project has the following modules:

      • prefix
      • prefix-suffix
      • assembly

      ... with "prefix-suffix" depending on junit for instance, "prefix" depending on nothing, and "assembly" depending on both "prefix" and "prefix-suffix".

      Then adding the following in the assembly descriptor will result in "prefix-suffix.jar" and "junit.jar" being present in "lib/prefix/", while we would only expect it in "lib/prefix-suffix/":

        <dependencySets>
          <dependencySet>
            <outputDirectory>lib/prefix</outputDirectory>
            <scope>runtime</scope>
            <useTransitiveDependencies>true</useTransitiveDependencies>
            <useTransitiveFiltering>true</useTransitiveFiltering>
            <includes>
              <include>test:prefix</include>
            </includes>
          </dependencySet>
          <dependencySet>
            <outputDirectory>lib/prefix-suffix</outputDirectory>
            <scope>runtime</scope>
            <useTransitiveDependencies>true</useTransitiveDependencies>
            <useTransitiveFiltering>true</useTransitiveFiltering>
            <includes>
              <include>test:prefix-suffix</include>
            </includes>
          </dependencySet>
        </dependencySets>
      

      I attached a patch with a failing integration test demonstrating the issue.

      Known workaround: use "test:prefix:*" instead of "test:prefix" in the assembly descriptor.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              yrodiere Yoann Rodière
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: