[
https://jira.codehaus.org/browse/MDEP-279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Brett Porter closed MDEP-279.
-----------------------------
Resolution: Duplicate
Assignee: Brett Porter (was: Brian Fox)
> <excludes /> an <includes /> patterns do not work with .tar.gz packaging
> ------------------------------------------------------------------------
>
> Key: MDEP-279
> URL: https://jira.codehaus.org/browse/MDEP-279
> Project: Maven 2.x Dependency Plugin
> Issue Type: Bug
> Components: unpack
> Affects Versions: 2.0, 2.1
> Reporter: Torben Knerr
> Assignee: Brett Porter
>
> I have created a {{myapp-1.0-jar-with-dependencies.tar.gz}} file using the
> maven-assembly-plugin:
> {code}
> <?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>
> {code}
> 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:
> {code}
> <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>
> {code}
> *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
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira