java - How can I tell maven to prefer SNAPSHOT versions over incremental versions? -
because incremental build number = ci build number, don't want put incremental build number development poms. should have major , minor version components.
- version in pom = e.g. 1.1-snapshot
- version of release = e.g. 1.1.23
however, component within same framework want "if snapshot version exists locally, use that, otherwise use latest incremental version".
how can specify in 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 doesn't work. still resolves version e.g. 1.1.23. how can tell maven prefer snapshot version?
i not fuly understand trying here general deal:
- use snapshots in development only. never put them in ranges.
- your range expression has contain 2 arguments. have 2 ranges three.
- provide ranges stable releases only.
Comments
Post a Comment