org.codehaus.mojo.sqlj.CleanMojo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sqlj-maven-plugin Show documentation
Show all versions of sqlj-maven-plugin Show documentation
A wrapper around the sqlj.tools.Sqlj SQLJ Translator.
The newest version!
package org.codehaus.mojo.sqlj;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
/**
* Cleans out generated stale resources.
*
* @author David J. M. Karlsen
*/
@Mojo( name = "clean", defaultPhase = LifecyclePhase.CLEAN )
public class CleanMojo
extends AbstractSqljMojo
{
/**
* {@inheritDoc}
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
try
{
FileUtils.deleteDirectory( getGeneratedSourcesDirectory() );
FileUtils.deleteDirectory( getGeneratedResourcesDirectory() );
}
catch ( IOException e )
{
throw new MojoFailureException( e.getMessage() );
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy