Uploaded image for project: 'Maven Dependency Plugin'
  1. Maven Dependency Plugin
  2. MDEP-288

The includes/excludes feature on the dependency:unpack goal does not work for artifacts of type tar.gz

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.1
    • None
    • unpack
    • None

    Description

      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] ------------------------------------------------------------------------

      Attachments

        Issue Links

          Activity

            People

              brianf Brian E Fox
              bengel Bryan Engel
              Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: