
com.tpspay.postmaven.postbuild.PostCleanMojo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of postbuild-maven-plugin Show documentation
Show all versions of postbuild-maven-plugin Show documentation
A maven build plugin for building Postilion nodes.
package com.tpspay.postmaven.postbuild;
import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
/**
* Goal to clean postilion's build directory
*
* @goal post-clean
*
* @phase clean
*
* @author John Oxley <[email protected]>
*/
public class PostCleanMojo extends AbstractPostilionBuildMojo {
public void execute() throws MojoExecutionException, MojoFailureException {
try {
File dir = new File("build");
if (!dir.exists()) {
return;
}
File generatedFile = new File(buildGeneratedFile);
if (generatedFile.exists()) {
generatedFile.delete();
}
getLog().info("Deleting " + dir.getAbsolutePath());
FileUtils.deleteDirectory(dir);
} catch (IOException e) {
throw new MojoExecutionException("Problem deleting build directory", e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy