As per the manual, with Maven 3 we\'re forced to use uniqueSnapshots=true
. This means that each deployment of 1.0-SNAPSHOT
is actually backed by so
The maven-deploy-plugin does not store the deployment timestamp in system properties.
If you want to take a look at the source code (and maybe make an enhancement request), this deployment timestamp is calculated in class org.apache.maven.artifact.transform.SnapshotTransformation by the method getDeploymentTimestamp of the project maven-artifact-manager.
The final version of the deployed artifact is calculated in method construcVersion : the SNAPSHOT
is replaced by timestamp-buildNumber
, where timestamp
is the result of getDeploymentTimestamp
and buildNumber
is an increment.
It should be possible to store this constructed version with System.setProperty("something", version)
; and then access it in the pom.xml
with ${something}
.