Class FlywayMigrateMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- com.link_intersystems.dbunit.maven.mojo.FlywayMigrateMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="flyway-migrate") public class FlywayMigrateMojo extends org.apache.maven.plugin.AbstractMojo
Migrates a collection of DBUnit data set files from one database schema version to another with the use of Flyway and testcontainers.- Author:
- René Link <rene.link@link-intersystems.com>
-
-
Field Summary
Fields Modifier and Type Field Description protected DataSetsConfig
dataSets
DataSet selection configuration.protected FlywayConfig
flyway
Flyway configuration.protected org.apache.maven.execution.MavenSession
mavenSession
protected MigrationConfig
migration
Migration process related configuration.protected org.apache.maven.plugin.MojoExecution
mojoExecution
protected org.apache.maven.project.MavenProject
project
protected TestcontainersConfig
testcontainers
Testcontainers database configuration.
-
Constructor Summary
Constructors Constructor Description FlywayMigrateMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
autoConfigure()
void
execute()
protected void
executeMigration()
protected List<com.link_intersystems.dbunit.stream.resource.DataSetResource>
getDataSetResources(com.link_intersystems.util.config.properties.ConfigProperties config)
FlywayTestcontainersMigrationDataSetPipeFactory
getFlywayTransformerFactory()
protected org.slf4j.Logger
getSlf4JLogger()
protected void
validateConfigurations()
-
-
-
Field Detail
-
project
@Parameter(property="project", readonly=true, required=true) protected org.apache.maven.project.MavenProject project
-
mojoExecution
@Parameter(property="mojoExecution", readonly=true, required=true) protected org.apache.maven.plugin.MojoExecution mojoExecution
-
mavenSession
@Parameter(defaultValue="${session}", required=true, readonly=true) protected org.apache.maven.execution.MavenSession mavenSession
-
flyway
@Parameter protected FlywayConfig flyway
Flyway configuration.see Flyway Options
-
dataSets
@Parameter protected DataSetsConfig dataSets
DataSet selection configuration.see Dataset Options
-
testcontainers
@Parameter protected TestcontainersConfig testcontainers
Testcontainers database configuration.
-
migration
@Parameter protected MigrationConfig migration
Migration process related configuration.see Flyway Option
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
autoConfigure
protected void autoConfigure() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
validateConfigurations
protected void validateConfigurations() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
executeMigration
protected void executeMigration()
-
getSlf4JLogger
protected org.slf4j.Logger getSlf4JLogger()
-
getFlywayTransformerFactory
public FlywayTestcontainersMigrationDataSetPipeFactory getFlywayTransformerFactory()
-
getDataSetResources
protected List<com.link_intersystems.dbunit.stream.resource.DataSetResource> getDataSetResources(com.link_intersystems.util.config.properties.ConfigProperties config)
-
-