Maven rename jar with timestamp suffix

Timestamp snapshot labels when using the dependency plugin to copy them.

Does anyone know what went wrong?

[INFO] --- maven-dependency-plugin:2.5.1:copy-dependencies (copy-dependencies) @ pdfsec --- [INFO] Copying test-3.5.9-SNAPSHOT.jar to test-3.5.9-20130726.002521-6.jar <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.5.1</version> <executions> <execution> <id>copy-dependencies</id> <phase>initialize</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <useSubDirectoryPerScope>true</useSubDirectoryPerScope> <overWriteSnapshots>true</overWriteSnapshots> <overWriteIfNewer>true</overWriteIfNewer> <excludeArtifactIds>unboundid-ldapsdk</excludeArtifactIds> </configuration> </execution> </executions> </plugin> 
+4
source share
2 answers

Update version 2.8 of the plugin and set the useBaseVersion option to true .

From the command line:

 mvn dependency:copy -Dmdep.useBaseVersion=true -Dartifact=x:y:z:p:c ... 

(kudos to Jens Kreidler )

+8
source

Attach <uniqueVersion>false</uniqueVersion> there.

+1
source

Source: https://habr.com/ru/post/1493602/


All Articles