maven-assembly-plugin icon indicating copy to clipboard operation
maven-assembly-plugin copied to clipboard

[MASSEMBLY-865] dependencySet "include" seems to implicitly append wildcards to simple groupId:artifactId values

Open jira-importer opened this issue 8 years ago • 1 comments

Yoann Rodière opened MASSEMBLY-865 and commented

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.


Affects: 2.6, 3.0.0, 3.1.0

Attachments:

1 votes, 1 watchers

jira-importer avatar Jul 25 '17 09:07 jira-importer