The includes/excludes feature on the dependency:unpack goal does not work for artifacts of type tar.gz ------------------------------------------------------------------------------------------------------
Key: MDEP-288 URL: http://jira.codehaus.org/browse/MDEP-288 Project: Maven 2.x Dependency Plugin Issue Type: Bug Components: unpack Affects Versions: 2.1 Reporter: Bryan Engel Assignee: Brian Fox I am trying to unpack an artifact of type tar.gz and filter some of the files. Nothing is filtered. This works for artifacts of type zip, but not tar.gz. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.1</version> <executions> <execution> <id>modules</id> <phase>process-resources</phase> <goals> <goal>unpack</goal> </goals> <configuration> <artifactItems> <!-- Doesn't Work --> <artifactItem> <groupId>org.apache.maven</groupId> <artifactId>apache-maven</artifactId> <type>tar.gz</type> <classifier>src</classifier> <version>2.2.1</version> <outputDirectory>out1</outputDirectory> <excludes>**/*.txt</excludes> </artifactItem> <!-- Works --> <artifactItem> <groupId>org.apache.maven</groupId> <artifactId>apache-maven</artifactId> <type>zip</type> <classifier>src</classifier> <version>2.2.1</version> <outputDirectory>out2</outputDirectory> <excludes>**/*.txt</excludes> </artifactItem> </artifactItems> </configuration> </execution> </executions> </plugin> log output: C:\tmp>mvn process-resources [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building FabricServer Installer [INFO] task-segment: [process-resources] [INFO] ------------------------------------------------------------------------ [INFO] [resources:resources {execution: default-resources}] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\tmp\src\main\resources [INFO] [dependency:unpack {execution: modules}] [INFO] Configured Artifact: org.apache.maven:apache-maven:src:2.2.1:tar.gz [INFO] Configured Artifact: org.apache.maven:apache-maven:src:2.2.1:zip [INFO] Unpacking C:\Documents and Settings\xxxx\.m2\repository\org\apache\maven\apache-maven\2.2.1\apache-maven-2.2.1- src.tar.gz to C:\tmp\out1 with includes null and excludes:**/*.txt [INFO] Expanding C:\Documents and Settings\xxxx\.m2\repository\org\apache\maven\apache-maven\2.2.1\apache-maven-2.2.1- src.tar.gz to C:\DOCUME~1\bengel\LOCALS~1\Temp\tmp1546101557682884989.tar [INFO] Expanding: C:\DOCUME~1\bengel\LOCALS~1\Temp\tmp1546101557682884989.tar into C:\tmp\out1 [INFO] Unpacking C:\Documents and Settings\xxxx\.m2\repository\org\apache\maven\apache-maven\2.2.1\apache-maven-2.2.1- src.zip to C:\tmp\out2 with includes null and excludes:**/*.txt [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 17 seconds [INFO] Finished at: Thu Sep 30 15:20:28 EDT 2010 [INFO] Final Memory: 13M/24M [INFO] ------------------------------------------------------------------------ -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira