{
Artifact currentArtifact = iterator.next();
String versionlessKey = ArtifactUtils.versionlessKey( currentArtifact );
Map<String, String> versionMap = new HashMap<String, String>();
VersionInfo versionInfo = new DefaultVersionInfo( currentArtifact.getVersion() );
versionMap.put( ReleaseDescriptor.ORIGINAL_VERSION, versionInfo.toString() );
prompter.showMessage(
"Dependency '" + versionlessKey + "' is a snapshot (" + currentArtifact.getVersion() + ")\n" );
String result = prompter.prompt( "Which release version should it be set to?",
versionInfo.getReleaseVersionString() );
versionMap.put( ReleaseDescriptor.RELEASE_KEY, result );
iterator.remove();
// by default, keep the same version for the dependency after release, unless it was previously newer
// the user may opt to type in something different
VersionInfo nextVersionInfo = new DefaultVersionInfo( result );
String nextVersion;
if ( nextVersionInfo.compareTo( versionInfo ) > 0 )
{
nextVersion = nextVersionInfo.toString();
}
else
{
nextVersion = versionInfo.toString();
}