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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

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

hanasaki@gmail.com
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Karl Heinz Marbaise-3
Hi,

On 09/01/18 00:44, [hidden email] 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

hanasaki@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" <[hidden email]> wrote:

Hi,


On 09/01/18 00:44, [hidden email] 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>
Reply | Threaded
Open this post in threaded view
|

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

Hervé BOUTEMY
In reply to this post by hanasaki@gmail.com
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 [hidden email] 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: [hidden email]
> For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]