net.sf.debianmaven.CheckMojo 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.
Fork of: http://debian-maven.sourceforge.net
The newest version!
package net.sf.debianmaven;
import org.apache.maven.plugin.MojoExecutionException;
import java.io.IOException;
/**
* Checks whether the generated package complies to style rules.
*
* Uses external utility: lintian.
*
* @goal check
* @phase package
*/
public class CheckMojo extends AbstractDebianMojo
{
private void runLintian() throws IOException, MojoExecutionException
{
runProcess(new String[]{"lintian", getPackageFile().toString()}, true);
}
protected void executeDebMojo() throws MojoExecutionException
{
try
{
runLintian();
}
catch (IOException e)
{
getLog().error(e.toString());
throw new MojoExecutionException(e.getMessage(), e);
}
}
}