--
Take a SNAPSHOT
In a team development situation, however, sometimes things move a bit faster than the above scenario can easily handle. If bug fixes and enhancements are coming thick and fast, you may want a way to say "this project depends on the very latest available service-database, whatever that is." This is a good spot to use a SNAPSHOT. When creating a jar file for our service-database, we have the option to build and deploy either a versioned jar (for example, 2.0), or a SNAPSHOT. Snapshot is a special version that indicates a current development copy. Unlike regular versions, Maven will check for a new SNAPSHOT version in a remote repository for every build. For "normal" versions, once Maven has downloaded 2.0 (for example), it never tries to get a "new" 2.0. Once 2.0, always 2.0—to get changes, you'd need to go to 2.0.1 (or some other version). With a SNAPSHOT version, though, Maven will automatically fetch the latest SNAPSHOT every time you build your project. For rapidly moving code, this can be a necessity, particularly in a team environment.
60



被折叠的 条评论
为什么被折叠?



