tentackle-sql:reveng

Full name:

org.tentackle:tentackle-sql-maven-plugin:25.20.0.0:reveng

Description:

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 org.tentackle.sql.metadata) and writes one model-source file per table into outputDir, in exactly the plain-text format that tentackle-wizard:pdo's -DbatchDir batch mode already reads. It does not generate any Java code itself — running pdo on the output directory is the second, separate step:

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 integrity; composite (aggregate) semantics cannot be inferred from schema metadata and are left for the user to add by hand to the generated files before running pdo. A foreign key referencing a table that is not part of the same reveng run is left as a plain attribute (with an explanatory comment) rather than a relation, since the batch model cannot resolve a relation to an entity that isn't among the files being loaded.

Attributes:

  • Requires a Maven project to be executed.
  • Executes as an aggregator goal.
  • The goal is thread-safe and supports parallel builds.

Required Parameters

Name Type Since Description
<tables> String - Comma-separated list of table names to reverse-engineer.
User Property: tentackle.reveng.tables
<url> String - The backend URL.
User Property: tentackle.reveng.url
<user> String - The backend username.
User Property: tentackle.reveng.user

Optional Parameters

Name Type Since Description
<charset> String - The encoding to read and write files.
Applied JVM-wide, see org.tentackle.maven.AbstractTentackleMojo.determineEncoding() .
Default: ${project.build.sourceEncoding}
<entityOptions> String - Additional entity option flags written verbatim into every generated entity's global options line, comma-separated, for example remote, tracked.
User Property: tentackle.reveng.entityOptions
<integrity> String - The integrity := value applied to every generated entity.
Defaults to related (application-checked, database foreign key expected) since a physical foreign key was, by definition, already found in the database for any relation this goal emits.
Default: related
User Property: tentackle.reveng.integrity
<jdkToolchain> Map<String,String> - Toolchain for invocation of external tools.
Explicitly specifies the "jdk" toolchain for this plugin only. Overrides the toolchain selected by the maven-toolchain-plugin, if any.

Example:

  <jdkToolchain>
    <version>25</version>
  </jdkToolchain>
To deselect the toolchain configured by the maven-toolchain-plugin:
  <jdkToolchain></jdkToolchain>
<minLogLevel> String - The minimum logging java.util.logging.Level to redirect java.util logging to the maven logger.
Any name or value accepted by java.util.logging.Level.parse(java.lang.String) .
Default: WARNING
<outputDir> File - The directory the generated model source files are written to.
Pass this directory as -DbatchDir to tentackle-wizard:pdo.
Default: ${project.build.directory}/reveng-model
User Property: tentackle.reveng.outputDir
<overwrite> boolean - Whether to overwrite already existing files in outputDir .
Default: false
User Property: tentackle.reveng.overwrite
<password> String - The backend password.
User Property: tentackle.reveng.password
<schemas> String - Optional comma-separated list of schema names to restrict introspection to.
User Property: tentackle.reveng.schemas
<skip> Boolean - Skips processing.
If not set, defaults to true if packaging is "pom" and the execution is recursive (see org.tentackle.maven.AbstractTentackleMojo.isSkippedByDefault() ).
<startClassId> int - The class id assigned to the first reverse-engineered entity; subsequent entities (in the order of tables ) get consecutive ids.
Batch-mode model source always needs a concrete, non-zero class id (see tentackle-wizard:pdo's batch mode), so the caller is responsible for choosing a range that does not collide with the target project's already assigned class ids, exactly as when hand-writing batch model files.
Default: 1
User Property: tentackle.reveng.startClassId
<stereotype> String - Optional stereotype (without the #) written into every generated entity's global options line, so that tentackle-wizard:pdo's batch mode can select the matching PdoProfile when more than one is configured.
User Property: tentackle.reveng.stereotype
<verbosity> String - The verbosity.
One of "default", "info" or "debug". Other values are treated as "default".
If not set, debug is turned on by Maven's global debug flag (see command line switch -X).
Default: ${tentackle.verbosity}

Parameter Details

<charset>

The encoding to read and write files.
Applied JVM-wide, see org.tentackle.maven.AbstractTentackleMojo.determineEncoding() .
  • Type: java.lang.String
  • Required: No
  • Default: ${project.build.sourceEncoding}

<entityOptions>

Additional entity option flags written verbatim into every generated entity's global options line, comma-separated, for example remote, tracked.
  • Type: java.lang.String
  • Required: No
  • User Property: tentackle.reveng.entityOptions

<integrity>

The integrity := value applied to every generated entity.
Defaults to related (application-checked, database foreign key expected) since a physical foreign key was, by definition, already found in the database for any relation this goal emits.
  • Type: java.lang.String
  • Required: No
  • User Property: tentackle.reveng.integrity
  • Default: related

<jdkToolchain>

Toolchain for invocation of external tools.
Explicitly specifies the "jdk" toolchain for this plugin only. Overrides the toolchain selected by the maven-toolchain-plugin, if any.

Example:

  <jdkToolchain>
    <version>25</version>
  </jdkToolchain>
To deselect the toolchain configured by the maven-toolchain-plugin:
  <jdkToolchain></jdkToolchain>
  • Type: java.util.Map<java.lang.String, java.lang.String>
  • Required: No

<minLogLevel>

The minimum logging java.util.logging.Level to redirect java.util logging to the maven logger.
Any name or value accepted by java.util.logging.Level.parse(java.lang.String) .
  • Type: java.lang.String
  • Required: No
  • Default: WARNING

<outputDir>

The directory the generated model source files are written to.
Pass this directory as -DbatchDir to tentackle-wizard:pdo.
  • Type: java.io.File
  • Required: No
  • User Property: tentackle.reveng.outputDir
  • Default: ${project.build.directory}/reveng-model

<overwrite>

Whether to overwrite already existing files in outputDir .
  • Type: boolean
  • Required: No
  • User Property: tentackle.reveng.overwrite
  • Default: false

<password>

The backend password.
  • Type: java.lang.String
  • Required: No
  • User Property: tentackle.reveng.password

<schemas>

Optional comma-separated list of schema names to restrict introspection to.
  • Type: java.lang.String
  • Required: No
  • User Property: tentackle.reveng.schemas

<skip>

Skips processing.
If not set, defaults to true if packaging is "pom" and the execution is recursive (see org.tentackle.maven.AbstractTentackleMojo.isSkippedByDefault() ).
  • Type: java.lang.Boolean
  • Required: No

<startClassId>

The class id assigned to the first reverse-engineered entity; subsequent entities (in the order of tables ) get consecutive ids.
Batch-mode model source always needs a concrete, non-zero class id (see tentackle-wizard:pdo's batch mode), so the caller is responsible for choosing a range that does not collide with the target project's already assigned class ids, exactly as when hand-writing batch model files.
  • Type: int
  • Required: No
  • User Property: tentackle.reveng.startClassId
  • Default: 1

<stereotype>

Optional stereotype (without the #) written into every generated entity's global options line, so that tentackle-wizard:pdo's batch mode can select the matching PdoProfile when more than one is configured.
  • Type: java.lang.String
  • Required: No
  • User Property: tentackle.reveng.stereotype

<tables>

Comma-separated list of table names to reverse-engineer.
  • Type: java.lang.String
  • Required: Yes
  • User Property: tentackle.reveng.tables

<url>

The backend URL.
  • Type: java.lang.String
  • Required: Yes
  • User Property: tentackle.reveng.url

<user>

The backend username.
  • Type: java.lang.String
  • Required: Yes
  • User Property: tentackle.reveng.user

<verbosity>

The verbosity.
One of "default", "info" or "debug". Other values are treated as "default".
If not set, debug is turned on by Maven's global debug flag (see command line switch -X).
  • Type: java.lang.String
  • Required: No
  • Default: ${tentackle.verbosity}