Package org.flywaydb.maven
Class CleanMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.flywaydb.maven.CleanMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="clean", requiresDependencyResolution=TEST, defaultPhase=CLEAN, threadSafe=true) public class CleanMojo extends org.apache.maven.plugin.AbstractMojo
Maven goal that drops all database objects (tables, views, procedures, triggers, ...) in the configured schemas. The schemas are cleaned in the order specified by theschemas
property..
-
-
Constructor Summary
Constructors Constructor Description CleanMojo()
-
Method Summary
Modifier and Type Method Description protected void
doExecute(org.flywaydb.core.Flyway flyway)
Executes this mojo.void
execute()
protected java.lang.String
getProperty(java.lang.String name)
Retrieves this property from either the system or the maven properties.
-
-
-
Method Detail
-
doExecute
protected void doExecute(org.flywaydb.core.Flyway flyway) throws java.lang.Exception
Executes this mojo.- Parameters:
flyway
- The flyway instance to operate on.- Throws:
java.lang.Exception
- any exception
-
execute
public final void execute() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getProperty
protected java.lang.String getProperty(java.lang.String name)
Retrieves this property from either the system or the maven properties.- Parameters:
name
- The name of the property to retrieve.- Returns:
- The property value.
null
if not found.
-
-