org.apache.maven.plugin.clean
Class CleanMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.plugin.clean.CleanMojo
All Implemented Interfaces:
ContextEnabled, Mojo

public class CleanMojo
extends AbstractMojo

Goal which cleans the build.

This attempts to clean a project's working directory of the files that were generated at build-time. By default, it discovers and deletes the directories configured in project.build.directory, project.build.outputDirectory, project.build.testOutputDirectory, and project.reporting.outputDirectory.

Files outside the default may also be included in the deletion by configuring the filesets tag.

Since:
2.0
Version:
$Id: CleanMojo.html 828303 2012-08-07 22:10:04Z hboutemy $
Author:
Emmanuel Venisse
See Also:
Fileset
Is defined by the goal name:
clean

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
CleanMojo()
           
 
Method Summary
 void execute()
          Deletes file-sets in the following project build directory order: (source) directory, output directory, test directory, report directory, and then the additional file-sets.
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CleanMojo

public CleanMojo()
Method Detail

execute

public void execute()
             throws MojoExecutionException
Deletes file-sets in the following project build directory order: (source) directory, output directory, test directory, report directory, and then the additional file-sets.

Throws:
MojoExecutionException - When a directory failed to get deleted.
See Also:
Mojo.execute()


Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.