Maven specific version of a snapshot dependency

Viewed 30653

Is there a way to get Maven to download a specific snapshot version of a dependency? I know that specifying the dependency like this will download the lastest snapshot available:

<dependency>
<groupId>groupid</groupId>
<artifactId>artifact-id</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>

Is it possible to specify a specific snapshot version? (e.g.artifact-id-1.0.0-20090610.041042-5) This would be useful if the head snapshot build has broken something and the stable version of the dependency has yet to be officially released.

4 Answers

AFAIK the SNAPSHOT always refers to the latest build and there is no way to depend on specific version.

To work around this issue, you could republish the exact version you want to depend on in your own maven repository and assign it a specific version.

Related