clean:clean

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.

Mojo Attributes:

  • Requires a Maven 2.0 project to execute.
  • Since version: 2.0

Optional Parameters

Name Type Since Description
failOnError boolean 2.2 Indicates whether the build will continue even if there are clean errors. Default value is true.
filesets List 2.1 The list of fileSets to delete, in addition to the default directories.
followSymLinks boolean 2.1 Sets whether the plugin should follow Symbolic Links to delete files. Default value is false.
skip boolean 2.2 Disable the plugin execution. Default value is false.
verbose boolean 2.1 Sets whether the plugin runs in verbose mode. Default value is false.

Parameter Details

failOnError

Indicates whether the build will continue even if there are clean errors.

  • Type: boolean
  • Since: 2.2
  • Required: No
  • Expression: ${maven.clean.failOnError}
  • Default: true

filesets The list of fileSets to delete, in addition to the default directories.
  • Type: java.util.List
  • Since: 2.1
  • Required: No

followSymLinks Sets whether the plugin should follow Symbolic Links to delete files.
  • Type: boolean
  • Since: 2.1
  • Required: No
  • Expression: ${clean.followSymLinks}
  • Default: false

skip Disable the plugin execution.
  • Type: boolean
  • Since: 2.2
  • Required: No
  • Expression: ${clean.skip}
  • Default: false

verbose Sets whether the plugin runs in verbose mode.
  • Type: boolean
  • Since: 2.1
  • Required: No
  • Expression: ${clean.verbose}
  • Default: false