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.AbstractMojoMigrates 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 DataSetsConfigdataSetsDataSet selection configuration.protected FlywayConfigflywayFlyway configuration.protected org.apache.maven.execution.MavenSessionmavenSessionprotected MigrationConfigmigrationMigration process related configuration.protected org.apache.maven.plugin.MojoExecutionmojoExecutionprotected org.apache.maven.project.MavenProjectprojectprotected TestcontainersConfigtestcontainersTestcontainers database configuration.
-
Constructor Summary
Constructors Constructor Description FlywayMigrateMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidautoConfigure()voidexecute()protected voidexecuteMigration()protected List<com.link_intersystems.dbunit.stream.resource.DataSetResource>getDataSetResources(com.link_intersystems.util.config.properties.ConfigProperties config)FlywayTestcontainersMigrationDataSetPipeFactorygetFlywayTransformerFactory()protected org.slf4j.LoggergetSlf4JLogger()protected voidvalidateConfigurations()
-
-
-
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)
-
-