Java – why does Maven assembly plugin place the same dependencies in my zip multiple times?
•
Java
I put the assembly descriptors together
<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 contained in zip files many times (identical files) Why did this happen and how can I prevent it? (I thought maybe using usetransitivefiltering would stop it, but it didn't)
To illustrate its appearance in the zip file:
Screenshot Zip File http://www.openscada.org/AtlantisMavenBuild?action=AttachFile&do=get&target=multiple -deps. png
Solution
This is an error in the assembly plug - in I noticed it about a year ago There is no problem with the latest version of the assembly plug-in I recommend that you update the version of the assembly plug-in you are using to 2.2 beta 3 It should solve your problem
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<version>2.2-beta-3</version>
</plugin>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码
