Because my incremental build number = the CI build number, I don't want to put the incremental build number into my development POMs. It should only have the major and minor version components.
- Version in POM = e.g. 1.1-SNAPSHOT
- Version of release = e.g. 1.1.23
However, another component within the same framework will want to say "if the SNAPSHOT version exists locally, use that, otherwise use the latest incremental version".
How can I specify this in my POM?
I tried this:
<dependencies>
<dependency>
<groupId>com.example.ajb.versionpoc</groupId>
<artifactId>downstream</artifactId>
<version>[1.1-SNAPSHOT],[1.1,2.0)</version>
</dependency>
</dependencies>
But it doesn't work. It still resolves the version as e.g. 1.1.23. How can I tell Maven to prefer the SNAPSHOT version?