cstamas commented on code in PR #795:
URL: https://github.com/apache/maven/pull/795#discussion_r958093394


##########
maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java:
##########
@@ -242,6 +231,28 @@ private Versioning readVersions( RepositorySystemSession 
session, RequestTrace t
         return ( versioning != null ) ? versioning : new Versioning();
     }
 
+    private Versioning filterVersionsByRepositoryType( Versioning versioning, 
RemoteRepository remoteRepository )
+    {
+        if ( remoteRepository == null )
+        {
+            return versioning;
+        }
+
+        Versioning filteredVersions = versioning.clone();
+
+        for ( String version : versioning.getVersions() )
+        {
+            boolean snapshotVersion = version != null && version.endsWith( 
SNAPSHOT );

Review Comment:
   > If I choose to release a `foo-1.0-20220829.222835-1`, this would be a 
perfectly legitimate release with a slightly weird but totally legal version. 
However, by following your suggestion, this released artifact would be 
considered a snapshot and remove from a release repository. So it would not be 
considered for a version range. And that is a bug.
   
   Are you sure about this? Am a bit sceptical that Maven itself or some plugin 
(enforcer, release, versions...) would NOT handle such a version as snapshot. 
Also, in downstream project (the would depend on release 
`foo-1.0-20220829.222835-1`) you think the dependency would NOT be handled as 
snapshot but as a release (by maven itself or any of the plugins)?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to