Siegmann Daniel, NY wrote:
> Questions on "best practices". Lets say I'm working toward
> version 1.0,
> releasing snapshots as I go. But I also want to release a few
> alphas and
> betas. Would you name the versions
>
> 1.0-alpha-1-SNAPSHOT
> 1.0-alpha-1
> 1.0-alpha-2-SNAPSHOT
> 1.0-alpha-2
> ...
>
> or
>
> 1.0-SNAPSHOT
> 1.0-alpha-1
> 1.0-SNAPSHOT
> 1.0-alpha-2
> ...
>
> I can see where the former is a bit clearer as to the order in which
> versions were released. But if you don't have a set plan ahead of time
> as to how many alphas / betas will be cut, the names might not really
> work (for example 1.0-alpha-3-SNAPSHOT -> 1.0-beta-1).
Use the former, the latter might create problems in dependency resolution. E.g. we used the
latter pattern originally also for minor releases (1.0 --> 1.0-SNAPSHOT --> 1.0.1 -->
1.0-SNAPSHOT), but it turned out that
1.0-SNAPSHOT < 1.0 < 1.0.1
So, when we returned after the 1.0 release to 1.0-SNAPSHOT the dependency resolution never
selected the SNAPSHOT version anymore from the transitive deps if somewhere a released version
was available. I am not quite sure where 1.0-SNAPSHOT is inserted in the version sequence
compared to 1.0-alpha-x or 1.0-beta-x, but it might not necessarily the place where you expect
and you can get strange errors. Therefore it is best practice to use the SNAPSHOT always with
a version that will change for the next SNAPSHOT cycle.
- Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
|