Introduction
Brief introduction
The MAVEN plugin is designed for people who use Apache maven as a build tool.
The Maven plugin was designed to be used by people in the first MAVEN build tool.
As well as this maven plugin, Dbdeploy supports an ant task and a command line interface.
As well as this maven plugin, Dbdeploy supports ant task and command line interface
Usage
Use
The Maven plugin is introduced in version 3.0m3. It's published to Maven Central.
maven plugin was introduced to 3.0m3 in version . It is published to the Maven Center .
Example Pom.xml:
<build> <plugins> <plugin> <groupId>com.dbdeploy</groupId> <artifactId> maven-dbdeploy-plugin</artifactid> <version>3.0M3</version> <configuration> <scriptdirectory >.</scriptdirectory> <driver>org.hsqldb.jdbcdriver</driver> <url>jdbc:hsqldb:file:db/testdb;shutdown= true</url> <userid>sa</userid> <password></password> <dbms>hsql</dbms> <delimiter>;</delimiter> < Delimitertype>row</delimitertype> </ configuration> <dependencies> <dependency> <groupId> hsqldb</groupid> <artifactId>hsqldb</artifactId> <version>1.8.0.7</version> </dependency> </dependencies> </plugin> </ Plugins> </build>
The parameters match up and those on the Ant interface, see usingtheantinterface for more information. Currently (3.0M3), the Maven parmaters differ from the Ant interface in the following ways:
These parameters match the Ant interface, and more information looks at using the Ant interface. The current (3.0m3) version of the MAVEN parameter differs from the Ant interface in the following ways:
The MAVEN plugin supports the following goals:
The MAVEN plugin supports the following targets:
Db-scripts:executes dbdeploy in "Output file" mode
Database script: Execute dbdeploy "output file" mode
Update:executes Dbdeploy in "direct to database" mode
Update: Execute dbdeploy in "Direct database" mode
So, you can use in mvn dbdepoy:update a directory with a configured POM to apply updates to the database. As with any plugin-canconfigure a dbdeploy goal to execute automatically in any MAVEN lifecycle phase. None of its goals bind-a lifecycle phase by default.
So, you can use:
mvn dbdeploy:update
To run an update of a database this update is configured in the Pom file. As with any plug-in, you can configure the Dbdeploy target to automate any MAVEN life cycle phase. Its target is not bound to a default life cycle stage.
can use:
mvn help:describe -Dplugin=com.dbdeploy:maven-dbdeploy-plugin -Ddetail
To get full plugin documentation.
You can also use
MVN Help:describe-dplugin=com.dbdeploy:maven-dbdeploy-plugin-ddetail
Get the full plugin documentation
Special note for the 3.0m3 release
3.0M3 version requires special attention.
Unfortunately the pom.xml in the examples directory of the distribution are incorrect, see issue-for details.
Unfortunately, the Pom.xml file is not correct in the directory of the distribution examples, see the problem in detail 56
Specifically, you need-to-replace the version of 3.0-snapshot with 3.0m3 for it. Apologies.
Specifically, you'll need to replace the 3.0-snapshot version with 3.03M to keep him working, sorry.
Dbdeploy's maven plugin uses