deploying maven jar files and SNAPSHOT dependencies
We currently use SNAPSHOT modifier in development so that project dependencies are linked to the most current build of its dependencies. So when we build a project we get all the jars with various time SNAPSHOTS. Regardless of a code change.
This proves to be an issue when the end user wants to download a new release. For example there is a big jar file that is rarely updated. We w开发者_如何学Could like for that particular jar file to be referred to as it version number 1.4 as supposed to 1.4-SNAPSHOT when we release it to the customer meaning they only download new version when we make changes to the version number as supposed to when we last built it with or without changes.
What is the best way to achieve this? Am I missing something?
Please and thank you.
This proves to be an issue when the end user wants to download a new release.
First of all, releases should indeed use fixed versions. So if you're developing version 1.4-SNAPSHOT, the release version is supposed to be 1.4 (and you tag it as such in your VCS). And then you bump the new development version to 1.5-SNAPSHOT in the dev branch.
For example there is a big jar file that is rarely updated. We would like for that particular jar file to be referred to as it version number 1.4 (...)
But even if you follow the above "standard" process, nothing forces you to bump all versions after a release and you could just stick to a given fixed version of a particular artifact. This would remove the problem.
In my opinion a way to a user is a kind of delivery and should be handled by using the maven release process (mvn release) which automatically increments the version numbers. Than you have an exact relationship to your version control and what user has got. SNAPSHOT's should only be used in development.
精彩评论