Fork me on GitHub

Maven API

In terms of the maven plugin - it basically looks like the following.

<plugin>
    <groupId>com.goldmansachs.obevo</groupId>
    <artifactId>obevo-maven-plugin</artifactId>
    <version>${obevo.version}</version>
    <executions>
        <execution>
            <id>deploy-db-module</id>
            <goals>
                <goal>deploy</goal>
            </goals>
            <configuration>
                <env>dev1</env>
                <user>deployer</user>
                <password>deploypass</password>
                <sourcePath>src/main/database</sourcePath>
            </configuration>
        </execution>
    </executions>
</plugin>

The provided goals and arguments are mostly the same. Here is a rundown:

There are a few goals that are mostly similar. Here is a quick description:

1) “deploy” goal - does a regular deployment given the arguments provided

  • You can provide “noPrompt” and “cleanFirst” boolean arguments as needed

2) “test” goal - runs in the test phase, does a clean + deploy against that environment

  • The desired usage here is for your build, i.e. run at build-time against a test db server that only the build uses to verify that your db scripts are correct
  • It will set noPrompt=true and cleanFirst=true by default
  • Use the validateBaseline boolean argument if you’d like to leverage the validateBaseline functionality

3) “preview” goal - shows the changes that will be applied to the DB along with validations, but without doing an actual deployment A suggestion is to have these scripts run against a test db server that no one other than the build uses, so that you can guarantee that the scripts are fine

Configuring Custom Logging for Obevo in Maven

Obevo uses the SLF4J API, and the main jars do not include any logging implementations as third-party dependencies.

Hence, you can leverage the usual Maven logging settings to configure the log level for Obevo.