Why does maven-assembly-plugin put the same dependency in my zip several times?

I compiled the assembly descriptor

<assembly>
<id>all</id>
<formats>
    <format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<moduleSets>
    <moduleSet>
        <includes>
            <include>org.openscada.atlantis:org.openscada.atlantis.core.common</include>
            <include>org.openscada.atlantis:org.openscada.atlantis.net.base</include>
            <include>org.openscada.atlantis:org.openscada.atlantis.core.net.base</include>
            ... some more ...
            <include>org.openscada.atlantis:org.openscada.atlantis.spring.components</include>
        </includes>
        <binaries>
            <includeDependencies>true</includeDependencies>
            <outputDirectory>bin</outputDirectory>
            <unpack>false</unpack>
            <dependencySets>
                <dependencySet>
                    <outputDirectory>lib</outputDirectory>
                    <useTransitiveFiltering>true</useTransitiveFiltering>
                </dependencySet>
            </dependencySets>
        </binaries>
    </moduleSet>
</moduleSets>
</assembly>

nothing special, but now my dependencies are included in the zip file several times (the same files). Why is this happening, and how can I prevent it? (I thought maybe using useTransitiveFiltering would prevent this, but no)

To illustrate how it looks in a zip file, in the illustration:

Screenshot Zip file http://www.openscada.org/AtlantisMavenBuild?action=AttachFile&do=get&target=multiple-deps.png

+3
source share
1 answer

. , . . , , 2.2 beta 3. .

  <plugin>
      <artifactId>maven-assembly-plugin</artifactId>
      <groupId>org.apache.maven.plugins</groupId>
      <version>2.2-beta-3</version>
  </plugin>
+7

Source: https://habr.com/ru/post/1708091/


All Articles