25

I am using bitlyj snapshot jar to shorten URLs from the following link.

http://code.google.com/p/bitlyj/downloads/list

Will somebody explain me the term snapshot.jar? Are snapshot.jar files unstable or is there anything wrong with these kind of jars? What does 'snapshot' generally mean?

Peter O.
  • 32,158
  • 14
  • 82
  • 96
d-man
  • 57,473
  • 85
  • 212
  • 296

3 Answers3

30

SNAPSHOT indicates latest code in trunk or head. On whether you should use snapshot, the answer is depends:

  • Is there a fix for a bug in the snapshot release thats not available in the stable release?
  • Is there a new feature available in snapshot, but not available in stable version

You could make a call in these cases whether to use them or not.

Here's an article for your reference. It tells you when you should use snapshots.

We generally tend to use snapshots for maven plugins (some features are available in latest snapshots).

naikus
  • 24,302
  • 4
  • 42
  • 43
8

Yes, those files are usually automatically created from the current development branch without any manual testing.

Hendrik Brummermann
  • 8,242
  • 3
  • 31
  • 55
1

To begin with it's versions vs snapshots. Maven downloads a particular artifact and its final. Maven never re-attempts to download a version already existing in the repository. If something has changed, then a new version is released and is not accommodated in the same/older version of the artifact.(changes => new versions)

Now let's say, you got a dependency, that is a work in progress/ changes are expected. If you are to use versions, every time the artifact is updated, you gotta change versions in your pom. So to avoid these, snapshots are used. Maven treats snapshots differently. It tries to pull the latest snapshot of the artifact. (default interval is the first build of the day, can be altered). So you don't have to keep changing versions anymore and just include a snapshot, it's pulled automatically.

Hope that helps, Happy coding!

Very beautifully explained in this article.

Deekshith Anand
  • 2,175
  • 1
  • 21
  • 24