سؤال

My project has snapshot dependencies for which no releases are available. If I fix the version, such as <version>0.0.1-20140219.100706-347</version> instead of <version>0.0.1-SNAPSHOT</version>, do I now enjoy the benefits in speed of using releases or am I still subject to automatic updates slowing my build down just by using a dependency that resides in a snapshot repository? Are there any benefits of releases then other than having kind of a tag to a specific version?

هل كانت مفيدة؟

المحلول

do I now enjoy the benefits in speed of using releases or am I still subject to automatic updates slowing my build down

Yes; a timestamped SNAPSHOT version refers to a unique artifact, so Maven won't check again. You could also consider setting an update policy to reduce the frequency of checks (How does the updatePolicy in maven really work?).

Are there any benefits of releases then other than having kind of a tag to a specific version?

As a general practice, SNAPSHOT builds (even timestamped ones) aren't intended to stick around. Because you'll have one for every build it's normal to prune them (e.g. How to limit number of deployed snapshots artifacts in Nexus?). At some point you'll want to pick a specific version that will be kept permanently, and which can be used for reproducible builds: that's what final release versions are for.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top