net.sf.debianmaven.CleanMojo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of debian-maven-plugin Show documentation
Show all versions of debian-maven-plugin Show documentation
This plugin helps building DEB packages from Maven projects.
The packages can be used in DEB-based operating systems such
as Debian and Ubuntu. The plugin uses external Debian tools
to do the actual packaging.
The newest version!
package net.sf.debianmaven;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.apache.maven.plugin.MojoExecutionException;
/**
* Cleans up all files generated by this plugin.
*
* @goal clean
* @phase clean
*/
public class CleanMojo extends AbstractDebianMojo
{
protected void executeDebMojo() throws MojoExecutionException
{
try
{
FileUtils.deleteDirectory(stageDir);
getPackageFile().delete();
}
catch (IOException e)
{
throw new MojoExecutionException(e.toString());
}
}
}