}
}
if ( StringUtils.isEmpty( releaseDescriptor.getScmSourceUrl() ) )
{
throw new ReleaseFailureException(
"Missing required setting: scm connection or developerConnection must be specified." );
}
// As long as Scm.getId() does not exist, read it as a property
releaseDescriptor.setScmId( rootProject.getProperties().getProperty( "project.scm.id" ) );
try
{
scmRepositoryConfigurator.getConfiguredRepository( releaseDescriptor, releaseEnvironment.getSettings() );
}
catch ( ScmRepositoryException e )
{
throw new ReleaseScmRepositoryException( e.getMessage(), e.getValidationMessages() );
}
catch ( NoSuchScmProviderException e )
{
throw new ReleaseFailureException(
"The provider given in the SCM URL could not be found: " + e.getMessage() );
}
}
boolean containsSnapshotProjects = false;
for ( MavenProject project : reactorProjects )
{
if ( ArtifactUtils.isSnapshot( project.getVersion() ) )
{
containsSnapshotProjects = true;
}
}
if ( !containsSnapshotProjects && !releaseDescriptor.isBranchCreation() )
{
throw new ReleaseFailureException( "You don't have a SNAPSHOT project in the reactor projects list." );
}
result.setResultCode( ReleaseResult.SUCCESS );
return result;