Closed GlennRicaud closed 5 years ago
While testing Artifactory Rest API, especially /latestVersion and /versions, I found some strange behaviour:
http://repo.enonic.com/api/search/latestVersion?g=com.enonic.xp&a=distro&v=7 -> 7.0.0-A3 http://repo.enonic.com/api/search/latestVersion?g=com.enonic.xp&a=distro&v=6 -> 6.15.6-SNAPSHOT http://repo.enonic.com/api/search/versions?g=com.enonic.xp&a=distro&v=7* -> 7.0.0-A3, 7.0.0-SNAPSHOT
No problem of naming:
~/Downloads$ java -jar maven-artifact-3.6.0.jar 7.0.0-SNAPSHOT 7.0.0-A3
Display parameters as parsed by Maven (in canonical form) and comparison result:
1. 7.0.0-SNAPSHOT == 7-snapshot
7.0.0-SNAPSHOT > 7.0.0-A3
2. 7.0.0-A3 == 7-alpha-3
It looks like the sorting in Artifactory is based on some sort of createdTime (not last modified). And the behaviour is similar to the problem of Gradle here: 7.0.0-A3 is considered more recent than 7.0.0-SNAPSHOT.
There are other issues with Artifactory. An upgrade is planned. It will be followed by a support ticket if the problem is not solved.
Look at Gradle resolutionStrategy if nothing works
is'nt this latest stuff an extension to artifactory that Sten Roger built? Or is this their standard API?
Issue moved to enonic/app-contentstudio #37 via ZenHub
Temporary fix to unblock the build: https://github.com/enonic/app-contentstudio/commit/f60b4d80c5da1be9f122b79c4febdf7c16c1ce3e
Find a proper solution (resolutionStrategy?)