use of org.apache.maven.scm.repository.ScmRepositoryException in project maven-plugins by apache.
the class AbstractScmPublishMojo method execute.
public void execute() throws MojoExecutionException, MojoFailureException {
// setup the scm plugin with help from release plugin utilities
try {
setupScm();
} catch (ScmRepositoryException e) {
throw new MojoExecutionException(e.getMessage(), e);
} catch (NoSuchScmProviderException e) {
throw new MojoExecutionException(e.getMessage(), e);
}
boolean tmpCheckout = false;
if (checkoutDirectory.getPath().contains("${project.")) {
try {
tmpCheckout = true;
checkoutDirectory = File.createTempFile("maven-scm-publish", ".checkout");
checkoutDirectory.delete();
checkoutDirectory.mkdir();
} catch (IOException ioe) {
throw new MojoExecutionException(ioe.getMessage(), ioe);
}
}
try {
scmPublishExecute();
} finally {
if (tmpCheckout) {
FileUtils.deleteQuietly(checkoutDirectory);
}
}
}
Aggregations