Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.0, 2.1
-
None
-
None
Description
I have created a myapp-1.0-jar-with-dependencies.tar.gz file using the maven-assembly-plugin:
<?xml version="1.0" encoding="UTF-8"?> <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> <id>jar-with-dependencies</id> <formats> <format>tar.gz</format> </formats> <includeBaseDirectory>false</includeBaseDirectory> <!-- include any .jar dependencies we need in runtime scope --> <dependencySets> <dependencySet> <useStrictFiltering>true</useStrictFiltering> <scope>runtime</scope> <includes> <include>*:jar:*</include> </includes> </dependencySet> </dependencySets> </assembly>
Now I want to unpack myapp-1.0-jar-with-dependencies.tar.gz to another maven project's target directory, but exclude some of the files in the .tar.gz file:
<plugin> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>copy-to-shared-folder</id> <phase>generate-sources</phase> <goals> <goal>unpack</goal> </goals> <configuration> <artifactItems> <artifactItem> <groupId>my.group.id</groupId> <artifactId>myapp</artifactId> <version>1.0</version> <classifier>jar-with-dependencies</classifier> <type>tar.gz</type> <includes>**/*.*</includes> <excludes>**/bad-file.jar,**/some-stuff.log</excludes> <outputDirectory>${project.build.directory}/myapp-libs</outputDirectory> </artifactItem> </artifactItems> <overWriteReleases>true</overWriteReleases> <overWriteSnapshots>true</overWriteSnapshots> </configuration> </execution> </executions> </plugin>
However, the <includes /> and <excludes /> sections are completely ignored here.
I have noticed that for <type>zip</type> dependencies the include/exclude filters are working as expected, but I would assume that it should for for .tar.gz as well
Attachments
Issue Links
- duplicates
-
MDEP-242 Exclude does not work correctly for tar.gz (but is working for zip)
- Closed