}
}
if ( StringUtils.isEmpty( releaseDescriptor.getScmSourceUrl() ) )
{
throw new ReleaseFailureException(
"Missing required setting: scm connection or developerConnection must be specified." );
}
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 ( Iterator<MavenProject> it = reactorProjects.iterator(); it.hasNext(); )
{
MavenProject project = it.next();
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;