{
translateScm( project, releaseDescriptor, scmRoot, namespace, scmRepository, result, commonBasedir );
}
catch ( IOException e )
{
throw new ReleaseExecutionException( e.getMessage(), e );
}
}
else
{
releaseDescriptor.mapOriginalScmInfo( projectId, null );
MavenProject parent = project.getParent();
if ( parent != null )
{
// If the SCM element is not present, only add it if the parent was not mapped (ie, it's external to
// the release process and so has not been modified, so the values will not be correct on the tag),
String parentId = ArtifactUtils.versionlessKey( parent.getGroupId(), parent.getArtifactId() );
if ( !releaseDescriptor.getOriginalScmInfo().containsKey( parentId ) )
{
// we need to add it, since it has changed from the inherited value
scmRoot = new Element( "scm" );
scmRoot.addContent( "\n " );
try
{
if ( translateScm( project, releaseDescriptor, scmRoot, namespace, scmRepository, result,
commonBasedir ) )
{
rootElement.addContent( "\n " ).addContent( scmRoot ).addContent( "\n" );
}
}
catch ( IOException e )
{
throw new ReleaseExecutionException( e.getMessage(), e );
}
}
}
}
}