Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jakartaee-spec-project-leads] How to recognize the latest version of artifacts in central?

Lukas is right, using the maven-artifact tool it says 4.0.0.M1 > 4.0.0-RC1

java -jar %MAVEN_HOME%\lib\maven-artifact-3.6.3.jar 4.0.0.M1 4.0.0-RC1
Display parameters as parsed by Maven (in canonical form) and comparison result:
1. 4.0.0.M1 == 4.0.0.milestone-1
   4.0.0.M1 > 4.0.0-RC1
2. 4.0.0-RC1 == 4-rc-1

java - jar %MAVEN_HOME%\lib\maven-artifact-3.6.3.jar 4.0.0-RC1 4.0.0.M1
Display parameters as parsed by Maven (in canonical form) and comparison result:
1. 4.0.0-RC1 == 4-rc-1
   4.0.0-RC1 < 4.0.0.M1
2. 4.0.0.M1 == 4.0.0.milestone-1

We can conclude from above 4.0.0-RC1 becomes 4-rc-1 whereas 4.0.0.M1 becomes 4.0.0-milestone-1.
If we have 4.0.0-M1 and compare with 4.0.0-RC1 then it becomes 4-milestone-1 < 4-rc-1
If we have 4.0.0.RC1 and compare with 4.0.0-RC1 then it becomes 4.0.0-rc1 > 4-rc-1

Thanks
Hussain

-----Original Message-----
From: jakartaee-spec-project-leads-bounces@xxxxxxxxxxx <jakartaee-spec-project-leads-bounces@xxxxxxxxxxx> On Behalf Of Lukas Jungmann
Sent: Wednesday, May 27, 2020 3:28 AM
To: jakartaee-spec-project-leads@xxxxxxxxxxx
Subject: Re: [jakartaee-spec-project-leads] How to recognize the latest version of artifacts in central?

[External]


On 5/26/20 11:10 PM, arjan tijms wrote:
> Hi,
>
> Should be date.
>
> Both qualifiers are Maven recognised though, see
> https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Focto
> pus.com%2Fblog%2Fmaven-versioning-explained&amp;data=02%7C01%7Chussain
> .nm%40cognizant.com%7C8499180385e74d5e233d08d801bfe1ed%7Cde08c40719b94
> 27d9fe8edf254300ca7%7C0%7C0%7C637261270941831432&amp;sdata=9JkDfTKKIvw
> qtLBqSHMd0wc1wVlzbpbmfhNGZ1KAbqM%3D&amp;reserved=0

I'm not talking about version number recognition, I'm talking about proper version ordering, so one can rely on available tooling to save some time and use automation to take care of updating dependencies.

>
> Normally rc should come after m, and the separator is optional. Do
> note that they differ here: the "-" in RC vs the "." in the M1. I'm
> not entirely sure why Maven displays them out of order though, but my
> guess is the different separators confuse it.

https://apc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmaven.apache.org%2Fpom.html%23Version_Order_Specification&amp;data=02%7C01%7Chussain.nm%40cognizant.com%7C8499180385e74d5e233d08d801bfe1ed%7Cde08c40719b9427d9fe8edf254300ca7%7C0%7C0%7C637261270941831432&amp;sdata=oPPtZlzsOrVOHf3ytLeyX1rRdyyZrYd9wnOIz0hqIo0%3D&amp;reserved=0 explains it
- '.' is a version number separator, while '-' is not, so:

4.0.0-RC1 has 3 parts - 4, 0, 0-RC1
4.0.0.M1 has 4 parts - 4, 0, 0, M1

and maven compares 3rd part - '.0-RC1' with '.0' and if I got it right, ".qualifier" < ".number" applies => '.0-RC1' < '.0', so in the end '4.0.0-RC1' < '4.0.0.M1'

thanks,
--lukas


>
> Kind regards,
> Arjan
>
>
>
>
>
> On Tue, May 26, 2020 at 10:54 PM Lukas Jungmann
> <lukas.jungmann@xxxxxxxxxx <mailto:lukas.jungmann@xxxxxxxxxx>> wrote:
>
>     Hi,
>
>          I'm trying to update dependencies in some implementation projects
>     and came through this:
>
>     when I visit ie
>     https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsearch.maven.org%2Fartifact%2Fjakarta.el%2Fjakarta.el-api&amp;data=02%7C01%7Chussain.nm%40cognizant.com%7C8499180385e74d5e233d08d801bfe1ed%7Cde08c40719b9427d9fe8edf254300ca7%7C0%7C0%7C637261270941831432&amp;sdata=uBSbIMMP2x39oep1%2Bzih%2BDwCS8TDaR8raZ%2FENWOtAN4%3D&amp;reserved=0 I can see
>     that the latest version "by date" is 4.0.0-RC1
>
>     when I run `mvn -U -C versions:display-property-updates` I see:
>     [INFO] The following dependencies in Dependency Management have newer
>     versions:
>     [INFO]   jakarta.el:jakarta.el-api ...................... 4.0.0-RC1 ->
>     4.0.0.M1
>
>     which basically says that 4.0.0-RC1 has been updated by 4.0.0.M1.
>
>     Who should I trust? Maven? Date?
>
>     thanks,
>     --lukas
>     _______________________________________________
>     jakartaee-spec-project-leads mailing list
>     jakartaee-spec-project-leads@xxxxxxxxxxx
>     <mailto:jakartaee-spec-project-leads@xxxxxxxxxxx>
>     To unsubscribe from this list, visit
>
> https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
> eclipse.org%2Fmailman%2Flistinfo%2Fjakartaee-spec-project-leads&amp;da
> ta=02%7C01%7Chussain.nm%40cognizant.com%7C8499180385e74d5e233d08d801bf
> e1ed%7Cde08c40719b9427d9fe8edf254300ca7%7C0%7C0%7C637261270941831432&a
> mp;sdata=LYQyc39zpp2Bm1MJMYMoHFuGqhfZwKPL22DeMevm7iI%3D&amp;reserved=0
>
>
> _______________________________________________
> jakartaee-spec-project-leads mailing list
> jakartaee-spec-project-leads@xxxxxxxxxxx
> To unsubscribe from this list, visit
> https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
> eclipse.org%2Fmailman%2Flistinfo%2Fjakartaee-spec-project-leads&amp;da
> ta=02%7C01%7Chussain.nm%40cognizant.com%7C8499180385e74d5e233d08d801bf
> e1ed%7Cde08c40719b9427d9fe8edf254300ca7%7C0%7C0%7C637261270941831432&a
> mp;sdata=LYQyc39zpp2Bm1MJMYMoHFuGqhfZwKPL22DeMevm7iI%3D&amp;reserved=0
>
_______________________________________________
jakartaee-spec-project-leads mailing list jakartaee-spec-project-leads@xxxxxxxxxxx
To unsubscribe from this list, visit https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.eclipse.org%2Fmailman%2Flistinfo%2Fjakartaee-spec-project-leads&amp;data=02%7C01%7Chussain.nm%40cognizant.com%7C8499180385e74d5e233d08d801bfe1ed%7Cde08c40719b9427d9fe8edf254300ca7%7C0%7C0%7C637261270941831432&amp;sdata=LYQyc39zpp2Bm1MJMYMoHFuGqhfZwKPL22DeMevm7iI%3D&amp;reserved=0
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored.
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored.

Back to the top