hgschmie commented on code in PR #795:
URL: https://github.com/apache/maven/pull/795#discussion_r957987649
##########
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:
looking at
https://maven.apache.org/ref/3.8.6/maven-repository-metadata/repository-metadata.html#versioning,
it is IMHO clear that the versions that this method checks are either release
versions or versions ending with `-SNAPSHOT` as this list are versions
available in the remote repository. The remote repository does not expose the
separate, timestamped versions but only the `-SNAPSHOT` version as that is what
the user uses in the pom file and what the repository serves. The timestamped
versions would be here:
https://maven.apache.org/ref/3.8.6/maven-repository-metadata/repository-metadata.html#snapshotversion
and that would be used for resolving the actual file on disk for a specific
snapshot.
--
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]