Class RepairMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="repair",
          requiresDependencyResolution=TEST,
          defaultPhase=PRE_INTEGRATION_TEST,
          threadSafe=true)
    public class RepairMojo
    extends org.apache.maven.plugin.AbstractMojo
    Repairs the Flyway schema history table. This will perform the following actions:
    • Remove any failed migrations on databases without DDL transactions (User objects left behind must still be cleaned up manually)
    • Realign the checksums, descriptions and types of the applied migrations with the ones of the available migrations
    • Constructor Detail

      • RepairMojo

        public RepairMojo()
    • Method Detail

      • doExecute

        protected void doExecute​(org.flywaydb.core.Flyway flyway)
                          throws Exception
        Executes this mojo.
        Parameters:
        flyway - The flyway instance to operate on.
        Throws:
        Exception - any exception
      • execute

        public final void execute()
                           throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • getProperty

        protected String getProperty​(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.