}
try
{
// Note that the working directory here is not the same as in the release configuration, so don't reuse that
ReleaseDescriptor releaseDescriptor = createReleaseDescriptor();
if ( connectionUrl != null )
{
releaseDescriptor.setScmSourceUrl( connectionUrl );
}
releaseDescriptor.setLocalCheckout( localCheckout );
releaseDescriptor.setCheckoutDirectory( workingDirectory.getAbsolutePath() );
releaseDescriptor.setUseReleaseProfile( useReleaseProfile );
if ( goals == null )
{
// set default
goals = "deploy";
if ( project.getDistributionManagement() != null
&& project.getDistributionManagement().getSite() != null )
{
goals += " site-deploy";
}
}
releaseDescriptor.setPerformGoals( goals );
ReleasePerformRequest performRequest = new ReleasePerformRequest();
performRequest.setReleaseDescriptor( releaseDescriptor );
performRequest.setReleaseEnvironment( getReleaseEnvironment() );
performRequest.setReactorProjects( getReactorProjects() );