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


##########
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. 



-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to