Plugin Details
This report describes goals, parameters details, requirements and sample usage of this plugin.
Goals
Goals available for this plugin:
| Goal | Description |
|---|---|
| tentackle-sql:create | Generates an SQL script to create the database tables according to the model.
The script contains, in this order: the prependFilesets
, the classpath model if prependModelFromClassPath
, the schemas, tables and indexes per entity, the foreign keys, the classpath model if appendModelFromClassPath
, the sequences
, and finally the appendFilesets
. |
| tentackle-sql:document | Renders the model as a set of cross-linked HTML or Markdown pages, one per entity, plus an index page.
Unlike the ModelComment wurblet's Javadoc comment block, entity names mentioned on a page are hyperlinks to that entity's own page, so the whole model can be browsed by following references, composite trees, and inheritance in a browser or Markdown viewer. |
| tentackle-sql:help | Display help information on tentackle-sql-maven-plugin.
Call mvn tentackle-sql:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. |
| tentackle-sql:migrate | Generates an SQL script to migrate the database tables according to the model.
Connects to each connectable backend, compares its metadata table by table against the model, and writes the SQL required to bring the database in line, optionally guided by MigrationHints
. The script is only generated, never executed. |
| tentackle-sql:reveng | Reverse-engineers tables of an existing database into Tentackle model source files.
Given a JDBC connection and a list of table names, this goal introspects each table's columns, indexes and foreign keys (via mvn tentackle-sql:reveng -Dtentackle.reveng.tables=CUSTOMER,ORDER_ITEM -Dtentackle.reveng.url=jdbc:... -Dtentackle.reveng.user=... mvn tentackle-wizard:pdo -DbatchDir=target/reveng-model Foreign keys become plain, non-composite object relations using |
| tentackle-sql:run | Runs an SQL script against every configured connectable backend.
The statements are executed in autocommit mode, i.e. without a transaction. Each statement's result is logged. Example: mvn tentackle-sql:run -Dscript=src/sql/myscript.sql |
| tentackle-sql:validate | Validates the database against the model.
Same as the migrate goal, but the build fails if anything needs to be migrated.
Alternative to the validate configuration option of the migrate goal. |
System Requirements
The following specifies the minimum requirements to run this Maven plugin:
| Maven | 3.9.10 |
| JDK | 25 |
System Requirements History
The following specifies the minimum requirements to run this Maven plugin for historical versions:
| Plugin Version | Maven | JDK |
|---|---|---|
| from 25.17.0.0 to 25.20.0.0 | - | 25 |
| from 21.15.0.0 to 21.16.4.0 | - | 21 |
| from 17.8.0.0 to 17.14.0.6 | - | 17 |
| from 11.2.3.0 to 11.7.4.1 | - | 11 |
| from 8.2.2.0 to 8.3.0.5 | - | 8 |
| 2.2.0 | - | 11 |
| from 2.0.4 to 2.1.6 | - | 8 |
Usage
You should specify the version in your project's plugin configuration:
<project>
...
<build>
<!-- To define the plugin version in your parent POM -->
<pluginManagement>
<plugins>
<plugin>
<groupId>org.tentackle</groupId>
<artifactId>tentackle-sql-maven-plugin</artifactId>
<version>25.20.0.0</version>
</plugin>
...
</plugins>
</pluginManagement>
<!-- To use the plugin goals in your POM or parent POM -->
<plugins>
<plugin>
<groupId>org.tentackle</groupId>
<artifactId>tentackle-sql-maven-plugin</artifactId>
</plugin>
...
</plugins>
</build>
...
</project>
For more information, see "Guide to Configuring Plug-ins"
Tentackle