If you don't mind NOT using maven-dependency-plugin
, you can try to use these configuration inside your pom.xml
:
<build>
<plugins>
<plugin>
<groupId>com.github.goldin</groupId>
<artifactId>copy-maven-plugin</artifactId>
<version>0.2.5</version>
<executions>
<execution>
<id>copy-deps</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<resources>
<resource>
<targetPath>${project.build.directory}/lib</targetPath>
<dependency>
<includeScope>compile</includeScope>
</dependency>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
I've tried this in my local machine and it seems to produce the same timestamp as the JARs in my local M2 repository.
More info on the plugin here:
http://evgeny-goldin.com/wiki/Copy-maven-plugin