You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "hanasaki@gmail.com" <ha...@gmail.com> on 2018/01/08 23:44:28 UTC

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

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?

example:
	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)
		1.2.3

	OR

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

	* have also had the discussion of reversing to war-project-myorg.org
	* 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.

Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


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

Posted by Hanasaki Jiji <ha...@gmail.com>.
What do you want to know, specifically, other than what's in the posting?
Thank you

On Jan 9, 2018 3:03 AM, "Karl Heinz Marbaise" <kh...@gmx.de> wrote:

Hi,


On 09/01/18 00:44, hanasaki@gmail.com wrote:

> 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?
>
> example:
>      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)
>          1.2.3
>
>      OR
>
>      G:A:V = org.myproject.project
>          org-myorg-project-jar1 (and a org-myorg-project-war)
>          1.2.3
>
>      * have also had the discussion of reversing to war-project-myorg.org
>      * 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.
>

Can you give a little bit more of background information what you problem
is or what kind of issue you have?

Kind regards
Karl Heinz Marbaise

>
> Thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>

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

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi,

On 09/01/18 00:44, hanasaki@gmail.com wrote:
> 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?
> 
> example:
>      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)
>          1.2.3
> 
>      OR
> 
>      G:A:V = org.myproject.project
>          org-myorg-project-jar1 (and a org-myorg-project-war)
>          1.2.3
> 
>      * have also had the discussion of reversing to war-project-myorg.org
>      * 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.

Can you give a little bit more of background information what you 
problem is or what kind of issue you have?

Kind regards
Karl Heinz Marbaise
> 
> Thanks.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


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

Posted by Hervé BOUTEMY <he...@free.fr>.
Maven does not use the file name to try to guess artifactId: Maven has 
artifactId in a pom.xml (either as pom.xml coordinates, either as dependency 
coordinates) and when necessary generates a filename to find associated file.

Then there is never any ambiguity when files are in a Maven repository and 
accessed from their coordinates: 2 artifactId have their files in 2 separate 
directories, and 2 versions have also 2 separate directories.

In your case, IIUC, you're having a file outside a Maven repository and you're 
trying to guess its artifactId: that's not a scenario that is happening in 
Maven.

Regards,

Hervé

Le mardi 9 janvier 2018, 00:44:28 CET hanasaki@gmail.com a écrit :
> 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?
> 
> example:
> 	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)
> 		1.2.3
> 
> 	OR
> 
> 	G:A:V = org.myproject.project
> 		org-myorg-project-jar1 (and a org-myorg-project-war)
> 		1.2.3
> 
> 	* have also had the discussion of reversing to war-project-myorg.org
> 	* 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.
> 
> Thanks.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org