Skip to content

tacitknowledge/autopatch-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maven Autopatch plugin

Maven plugin allows you to apply database patches with [Autopatch] (https://github.com/tacitknowledge/autopatch) during any Maven project lifetime cycle.

Goals

  • patch - Goal which applies patches found in the classpath
  • info - Goal which provides patch information.
  • unlock - Goal which forcibly unlocks a patch table that has an orphan lock.

The next set of goals work for multiple system names at once. You should specify orchestration patch store system name.

  • distributed-patch - Goal which applies patches found in the classpath.
  • distributed-info - Goal which provides patch information.
  • distributed-unlock - Goal which forcibly unlocks a patch table that has an orphan lock.

Properties

NameDescriptionDefault value
skipskips the execution. TODO: implementfalse
classpathElementsa list specifying classpath folders where plugin will look for patches. ${project.compileClasspathElements}
migrationSettingsthe migration settings file"migration.properties"
systemNameThe system to get patch information about

POM usage:

<properties>
  <autopatch.system.name>integration_test</autopatch.system.name>
  <autopatch.migration.settings></autopatch.migration.settings>
</properties>

<plugin>
  <groupId>com.tacitknowledge</groupId>
  <artifactId>tk-autopatch-maven-plugin</artifactId>
  <version>1.3.0</version>
  <configuration>
    <!-- The location of the patches -->
    <classpathElements>
        <param>${basedir}/target/test-classes</param>
    </classpathElements>
    <!-- Custom migration settings file -->
    <migrationSettings>migration-distributed.properties</migrationSettings>
    <!-- The system name to run tests on -->
    <systemName>integration_test</systemName>
  </configuration>
  <executions>
    <execution>
      <phase>unlock</phase>
      <goals>
        <goal>distributed-info</goal>
      </goals>
    </execution>
  </executions>
</plugin>

<build>
  <plugins>
    <plugin>
      <groupId>com.tacitknowledge</groupId>
      <artifactId>tk-autopatch-maven-plugin</artifactId>
      <version>1.4.0</version>
      <executions>
        <execution>
          <phase>install</phase>
          <goals>
            <goal>distributed-patch</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>

About

A Maven plugin for executing Autopatch

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages