sorting versions for artifacts with hypen and / or dot in filename

(hanasaki jiji) #1

How is the artifact name separated from the version number if the artifact has hypens and / or dots in it? Are they sorted as Strings?

jar1 and the war are two submodules of a parent project

G:A:V = org.myorg.project
    org.myorg.project.jar1 (and a org.myorg.project.war)


G:A:V = org.myproject.project
    org-myorg-project-jar1 (and a org-myorg-project-war)

* have also had the discussion of reversing to
* above of course would have -SNAPSHOT versions too

The idea remove ambiguity between artifacts that would otherwise have ambiguity in their names. You might have seen many projects that have a core.jar or common.jar Of course this also is havoc if there are two core.jar files, from two different dependent projects, in the web lib directory of a WAR file. Need to be sure that maven and gradle will parse correctly and sort versions of x.y.z in the correct order and not revert to string ascii sort order.