Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ public class DefaultVersionRangeResolver
{

private static final String MAVEN_METADATA_XML = "maven-metadata.xml";


private static final String SNAPSHOT = "SNAPSHOT";

@SuppressWarnings( "unused" )
@Requirement( role = LoggerFactory.class )
private Logger logger = NullLoggerFactory.LOGGER;
Expand Down Expand Up @@ -254,10 +256,20 @@ private Map<String, ArtifactRepository> getVersions( RepositorySystemSession ses
Versioning versioning = readVersions( session, trace, metadataResult.getMetadata(), repository, result );
for ( String version : versioning.getVersions() )
{
if ( !versionIndex.containsKey( version ) )
{
versionIndex.put( version, repository );
}
if(request.getArtifact().getVersion().toUpperCase().contains(SNAPSHOT)){
if ( !versionIndex.containsKey( version ) )
{
versionIndex.put( version, repository );
}
}
else{
if(!version.toUpperCase().contains(SNAPSHOT)){
if ( !versionIndex.containsKey( version ) )
{
versionIndex.put( version, repository );
}
}
}
}
}

Expand Down