Uploaded image for project: 'Maven Antrun Plugin'
  1. Maven Antrun Plugin
  2. MANTRUN-192

filterArtifacts in DependencyFilesetsTask includes entire maven.local.repository

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7
    • 3.0.0
    • None

    Description

      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>

      Attachments

        Activity

          People

            gboue Guillaume Boué
            smaring Steve Maring
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: