1 package org.codehaus.mojo.sqlj;
2
3 import java.io.IOException;
4
5 import org.apache.commons.io.FileUtils;
6 import org.apache.maven.plugin.MojoExecutionException;
7 import org.apache.maven.plugin.MojoFailureException;
8 import org.apache.maven.plugins.annotations.LifecyclePhase;
9 import org.apache.maven.plugins.annotations.Mojo;
10
11
12
13
14
15
16 @Mojo( name = "clean", defaultPhase = LifecyclePhase.CLEAN )
17 public class CleanMojo
18 extends AbstractSqljMojo
19 {
20
21
22
23
24 public void execute()
25 throws MojoExecutionException, MojoFailureException
26 {
27 try
28 {
29 FileUtils.deleteDirectory( getGeneratedSourcesDirectory() );
30 FileUtils.deleteDirectory( getGeneratedResourcesDirectory() );
31 }
32 catch ( IOException e )
33 {
34 throw new MojoFailureException( e.getMessage() );
35 }
36 }
37
38 }