Reputation: 8747
In Java, I often see JAR files named with the version number of the software (jsoup-1.11.2.jar
), while others are not (freemarker.jar
).
Is this just a best practice/convention, or is there some functional reason for it?
Upvotes: 1
Views: 54
Reputation: 140457
Simple answer: no, this is purely a convention.
Obviously, tooling that checks versions can do that easily when version numbers are hard-coded like this. But there is no generic (like jvm based) tool relying on it.
And beyond that - sometimes this scheme is even counter productive. In our self grown build setup we have to always remember to update the build scripts after replacing JAR files - because a new version changes the file name (because version part of the file name).
Upvotes: 2
Reputation: 2233
Having the version in the name of the file allows you to quickly determine which of the n
files you have is the latest. Also if you have no way of determining what the version is from within the program it can be helpful.
Upvotes: 0