for ( String ver : versions.versions.keySet() )
{
try
{
Version v = versionScheme.parseVersion( ver );
if ( ver.endsWith( "-SNAPSHOT" ) )
{
snapshots.add( v );
}
else
{
releases.add( v );
}
}
catch ( InvalidVersionSpecificationException e )
{
continue;
}
}
for ( Version v : releases )
{
String ver = v.toString();
if ( isCompatible( request, ver ) )
{
version = ver;
repo = versions.versions.get( version );
break;
}
}
if ( version == null )
{
for ( Version v : snapshots )
{
String ver = v.toString();
if ( isCompatible( request, ver ) )
{
version = ver;
repo = versions.versions.get( version );
break;