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:

  1. use snapshots in development only. never put them in ranges.
  2. your range expression has contain 2 arguments. have 2 ranges three.
  3. provide ranges stable releases only.

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -