You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Steve Maring (JIRA)" <ji...@codehaus.org> on 2014/10/14 09:10:11 UTC

[jira] (MANTRUN-192) filterArtifacts in DependencyFilesetsTask includes entire maven.local.repository

Steve Maring created MANTRUN-192:
------------------------------------

             Summary: filterArtifacts in DependencyFilesetsTask includes entire maven.local.repository
                 Key: MANTRUN-192
                 URL: https://jira.codehaus.org/browse/MANTRUN-192
             Project: Maven Antrun Plugin
          Issue Type: Bug
    Affects Versions: 1.7
            Reporter: Steve Maring


When I define a scope and type, if the dependencyfileset task fails to match anything in my dependencies, the maven.project.dependencies refid will end up containing EVERY artifact found in my local maven repo.  A HUGE list.

If nothing matches, then maven.project.dependencies should contain nothing.

This is what I was trying to do ... merge the contents of map files IF they are found.  It is possible that none exist, so my test case was to comment them out, but I end up with a process that is trying to concat EVERY single file in my local Maven repo.

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.7</version>
        <inherited>false</inherited>
        <executions>
          <execution>
            <id>merge-maps</id>
            <phase>package</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <dependencyfilesets scopes="compile" types="map"/>
                <property name="map_files" refid="maven.project.dependencies"/>
                <echo message="merging map files: ${map_files}"/>
                <concat destfile="merged.map" fixlastline="yes">
                  <fileset refid="maven.project.dependencies"/>
                </concat>
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  
  
  <dependencies>
    <!-- 
    <dependency>
      <groupId>org.maring</groupId>
      <artifactId>map-a</artifactId>
      <version>1.0.0-SNAPSHOT</version>
      <type>map</type>
      <classifier>obf</classifier>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.maring</groupId>
      <artifactId>map-b</artifactId>
      <version>1.0.0-SNAPSHOT</version>
      <type>map</type>
      <classifier>obf</classifier>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    -->
  </dependencies>



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)