added a comment - - edited
It looks like these are the lines in MetadataTools.gatherSnapshotVersions causing the above exception:
String baseVersion = VersionUtil.getBaseVersion( reference.getVersion() );
baseVersion = baseVersion.substring( 0, baseVersion.indexOf( VersionUtil.SNAPSHOT ) - 1 );
if the indexOf returns 0, which I assume it will when the version is just "SNAPSHOT" (although I have to say I'm not really sure what the various getXXXVersion() methods are really doing), then this will clearly lead to the index out of bounds. If this is indeed a legitimate scenario, then the above code just needs to handle that case (e.g. set baseVersion to the empty string, ""). It appears that the baseVersion is only thereafter used if there is a timestamp on the snapshot to reconstruct a version string (in which case the string will be created incorrectly if the baseVersion is empty). Presumably this code would not get invoked if unique snapshots are off. I assume that it would be desirable to fix that case (timestamped "SNAPSHOT" versions) as well.