Search code examples
javajarconventions

Is there any functional reason for including the version number in the name of a JAR file?


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?


Solution

  • 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).