I read in Sun official documentation (or Sun online tutorial) about dotted naming for jar archives.
Was it ever encouraged to name jar artifacts like com.company.project.smallestdistributable.jar?
I read in Sun official documentation (or Sun online tutorial) about dotted naming for
Share
Generally this happens from time to time because the dotted naming convention can simulate a namespace within a system that doesn’t really handle namespaces.
In your case, you would be simulating the “com.company.project” namespace within the filesystem, with a resolution of “smallestdistributable.jar”.
No Java documentation I have ever read (that’s since about 1.2) has ever suggested using a naming system like this for JAR files. While one cannot know for sure why it was never recommended, one can guess. Earlier systems did not see the dotted extension as simply a part of the name, but sometimes saw them as a classifier. In the earliest systems, names and classifiers had very tight constraints on how many characters were allowed, and only a pattern of [NAME].[CLASSIFIER] was permitted by the file system. A JAR file (by the way, it’s 3 characters because if you wanted file names to be portable, that’s the longest classifier available on the filesystem with the shortest classifiers) that contained an extra period would break the filesystem’s understanding of the file, so
would be seen as
except actually it wouldn’t even get that far, because extensions could not have extensions.
I have seen some newer projects, that don’t concern themselves with [8].[3] naming conventions add the namespace to the jar file name, but it seems to be a new idea, and not something that was explicitly promoted outside of those development areas.