This is an Ant mapper class which can be used to remove the versions from the dependency artifact filenames..
This example shows how to use the version mapper.
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.4</version> <executions> <execution> <id>copy-dependencies</id> <phase>package</phase> <goals> <goal>run</goal> </goals> <configuration> <tasks> <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> </tasks> </configuration> </execution> </executions> </plugin>