You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Herve Boutemy (JIRA)" <ji...@codehaus.org> on 2013/05/12 12:50:53 UTC

[jira] (MDEP-242) Exclude does not work correctly for tar.gz (but is working for zip)

     [ https://jira.codehaus.org/browse/MDEP-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Herve Boutemy updated MDEP-242:
-------------------------------

    Description: 
While using the unpack feather of the dependecy plug-in we did searched and tried hard to get the 'excludes' option to work.

But whatever we did we were not able to get it working. Then came to the idea, of trying it with another archive type. So when using some zip file, it immediately worked. So it seams that somewhere in the unpacking of tar.gz, the excludes are forgotten.

Sorry, did not find time yet to have a detailed look into the code, to track where it happens.

PS: Also the documentation can be improved, where to include the 'excludes' tag. Under the tag 'configuration', or under the tag 'artifactItem'.


The plug-in configuration as we are using it:
{code:xml}            <plugin>
                <!-- Unpacks basic package to the staging directory -->
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.1</version>
                <executions>
                    <execution>
                        <id>unpack-tar</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>${basicInterfaceArtifactId}</artifactId>
                                    <version>${basicInterfaceVersion}</version>
                                    <classifier>pkg</classifier>
                                    <type>tar.gz</type>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>
                                        ${project.build.directory}/staging/
                                    </outputDirectory>
		                        	<excludes>**/*.jar</excludes>
                                </artifactItem>
                            </artifactItems>
                        	<excludes>**/*.jar</excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>{code}


  was:
While using the unpack feather of the dependecy plug-in we did searched and tried hard to get the 'excludes' option to work.

But whatever we did we were not able to get it working. Then came to the idea, of trying it with another archive type. So when using some zip file, it immediately worked. So it seams that somewhere in the unpacking of tar.gz, the excludes are forgotten.

Sorry, did not find time yet to have a detailed look into the code, to track where it happens.

PS: Also the documentation can be improved, where to include the 'excludes' tag. Under the tag 'configuration', or under the tag 'artifactItem'.


The plug-in configuration as we are using it:
            <plugin>
                <!-- Unpacks basic package to the staging directory -->
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.1</version>
                <executions>
                    <execution>
                        <id>unpack-tar</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>${basicInterfaceArtifactId}</artifactId>
                                    <version>${basicInterfaceVersion}</version>
                                    <classifier>pkg</classifier>
                                    <type>tar.gz</type>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>
                                        ${project.build.directory}/staging/
                                    </outputDirectory>
		                        	<excludes>**/*.jar</excludes>
                                </artifactItem>
                            </artifactItems>
                        	<excludes>**/*.jar</excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>


    
> Exclude does not work correctly for tar.gz (but is working for zip)
> -------------------------------------------------------------------
>
>                 Key: MDEP-242
>                 URL: https://jira.codehaus.org/browse/MDEP-242
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Tjeerd Verhagen
>
> While using the unpack feather of the dependecy plug-in we did searched and tried hard to get the 'excludes' option to work.
> But whatever we did we were not able to get it working. Then came to the idea, of trying it with another archive type. So when using some zip file, it immediately worked. So it seams that somewhere in the unpacking of tar.gz, the excludes are forgotten.
> Sorry, did not find time yet to have a detailed look into the code, to track where it happens.
> PS: Also the documentation can be improved, where to include the 'excludes' tag. Under the tag 'configuration', or under the tag 'artifactItem'.
> The plug-in configuration as we are using it:
> {code:xml}            <plugin>
>                 <!-- Unpacks basic package to the staging directory -->
>                 <artifactId>maven-dependency-plugin</artifactId>
>                 <version>2.1</version>
>                 <executions>
>                     <execution>
>                         <id>unpack-tar</id>
>                         <phase>process-resources</phase>
>                         <goals>
>                             <goal>unpack</goal>
>                         </goals>
>                         <configuration>
>                             <appendAssemblyId>false</appendAssemblyId>
>                             <artifactItems>
>                                 <artifactItem>
>                                     <groupId>${project.groupId}</groupId>
>                                     <artifactId>${basicInterfaceArtifactId}</artifactId>
>                                     <version>${basicInterfaceVersion}</version>
>                                     <classifier>pkg</classifier>
>                                     <type>tar.gz</type>
>                                     <overWrite>true</overWrite>
>                                     <outputDirectory>
>                                         ${project.build.directory}/staging/
>                                     </outputDirectory>
> 		                        	<excludes>**/*.jar</excludes>
>                                 </artifactItem>
>                             </artifactItems>
>                         	<excludes>**/*.jar</excludes>
>                         </configuration>
>                     </execution>
>                 </executions>
>             </plugin>{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira