Want to deploy your JVM, Node.js and Go apps effortlessly to AWS? Try our service Boxfuse

Maven Goal: Clean

Drops all objects (tables, views, procedures, triggers, ...) in the configured schemas.
The schemas are cleaned in the order specified by the schemas property.


Default Phase

  • pre-integration-test


> mvn flyway:clean


Parameter Required Default Description
url YES The jdbc url to use to connect to the database
driver NO Auto-detected based on url The fully qualified classname of the jdbc driver to use to connect to the database
serverId NO flyway-db The id of the server in the Maven settings.xml file to load the credentials from.

This is an alternative to passing the credentials in directly through properties.
user NO The user to use to connect to the database
password NO The password to use to connect to the database
schemas NO default schema of the connection Case-sensitive list of schemas managed by Flyway.
The schemas will be cleaned in the order of this list.
callbacks NO Fully qualified class names of FlywayCallback implementations to use to hook into the Flyway lifecycle.
skipDefaultCallbacks NO false Whether default built-in callbacks (sql) should be skipped. If true, only custom callbacks are used.
cleanDisabled NO false Whether to disable clean. This is especially useful for production environments where running clean can be quite a career limiting move.
skip NO false Skips the execution of the plugin for this module
configFile NO flyway.properties Properties file from which to load the Flyway configuration. The names of the individual properties match the ones you would use as Maven or System properties. The encoding of the file must be the same as the encoding defined with the flyway.encoding property, which is UTF-8 by default. Relative paths are relative to the POM.

Sample configuration


Sample output

> mvn flyway:clean

[INFO] [flyway:clean {execution: default-cli}]
[INFO] Cleaned database schema 'PUBLIC' (execution time 00:00.016s)

Maven: info