Class RevengMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
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.
- Author:
- harald
-
Field Summary
Fields inherited from class AbstractTentackleMojo
charset, JDK_TOOLCHAIN, minLogLevel, verbosity, verbosityLevelFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractTentackleMojo
createFileSetManager, createPackageMap, determineEncoding, determineJavaToolVersion, determineVerbosity, execute, finishExecute, getBaseDir, getCanonicalPath, getExecutionLock, getHostName, getIncludedFiles, getJavaHome, getLogger, getMajorVersion, getMavenProject, getMavenSession, getMojoExecution, getPathRelativeToBasedir, getRepositorySystem, getResourceDir, getResourceDirs, getSettings, getSettingsDecrypter, getToolchain, getToolchain, getToolchain, getToolchainManager, getToolFinder, installJavaLoggingHandler, isExecutionRecursive, isSkippedByDefault, loadResourceFileIntoString, prepareExecute, setLogger, toDescriptorName, validateMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
RevengMojo
public RevengMojo()
-
-
Method Details
-
executeImpl
public void executeImpl() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Specified by:
executeImplin classAbstractTentackleMojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-