VersionMapper

This is an Ant mapper class which can be used to remove the versions from the dependency artifact filenames..

Example

This example shows how to use the version mapper.

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.8</version>
        <executions>
          <execution>
            <id>copy-dependencies</id>
            <phase>package</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <mapper id="remove-versions"
                        classname="org.apache.maven.ant.tasks.support.VersionMapper"
                        from="${maven.project.dependencies.versions}" 
                        to="flatten" />
                <copy todir="lib" flatten="true">
                  <path>
                    <pathelement path="${maven.dependency.classpath}"/>
                  </path>
                  <mapper refid="remove-versions" />
                </copy>
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>