appfuse:gen-model

Full name:

org.codehaus.mojo:appfuse-maven-plugin:2.1-SNAPSHOT:gen-model

Description:

Generates Java classes from existing database tables. If you want to customize the reverse engineering strategy, you can modify the default hibernate.reveng.xml and put it in src/test/resources. You can also override the location by specifying the "revengfile" property in the <configuration>. For example:

<configuration>
  <componentProperties>
    <revengfile>path/to/hibernate.reveng.xml</revengfile>
  </componentProperties>
  <genericCore>${amp.genericCore}</genericCore>
  <fullSource>${amp.fullSource}</fullSource>
</configuration>

Oracle Users : If you create a custom hibernate.reveng.xml, make sure to capitalize the table names in <schema-selection match-schema="MY_SCHEMA_NAME"/>. You'll also need to add the following line to your jdbc.properties file:

hibernatetool.metadatadialect=org.hibernate.cfg.reveng.dialect.OracleMetaDataDialect

Attributes:

  • Requires a Maven 2.0 project to be executed.
  • Requires dependency resolution of artifacts in scope: test.
  • Binds by default to the lifecycle phase: generate-sources.
  • Invokes the execution of the lifecycle phase process-resources prior to executing itself.

Optional Parameters

Name Type Since Description
componentProperties Map - Parameter that holds component properties defined by the user.
components List - Parameter that holds components definitions specified by the user.
destinationDirectory String - The path where the generated artifacts will be placed. This is intentionally not set to the default location for maven generated sources. This is to keep these files out of the eclipse/idea generated sources directory as the intention is that these files will be copied to a source directory to be edited and modified and not re generated each time the plugin is run. If you want to regenerate the files each time you build the project just set this value to ${basedir}/target/generated-sources or set the flag on eclipse/idea plugin to include this file in your project file as a source directory. Default value is: ${basedir}.
disableInstallation boolean - Allows disabling installation - for tests and end users that don't want to do a full installation Default value is: false.
fullSource boolean - (no description) Default value is: false.
sourceDirectory String - The directory containing the source code. Default value is: ${basedir}/target/appfuse/generated-sources.
templateDirectory String - (no description) Default value is: ${basedir}/src/test/resources.

Parameter Details

componentProperties :

Parameter that holds component properties defined by the user.

  • Type: java.util.Map
  • Required: No

components :

Parameter that holds components definitions specified by the user.

  • Type: java.util.List
  • Required: No

destinationDirectory :

The path where the generated artifacts will be placed. This is intentionally not set to the default location for maven generated sources. This is to keep these files out of the eclipse/idea generated sources directory as the intention is that these files will be copied to a source directory to be edited and modified and not re generated each time the plugin is run. If you want to regenerate the files each time you build the project just set this value to ${basedir}/target/generated-sources or set the flag on eclipse/idea plugin to include this file in your project file as a source directory.

  • Type: java.lang.String
  • Required: No
  • Expression: ${appfuse.destinationDirectory}
  • Default: ${basedir}

disableInstallation :

Allows disabling installation - for tests and end users that don't want to do a full installation

  • Type: boolean
  • Required: No
  • Expression: ${appfuse.disableInstallation}
  • Default: false

fullSource :

(no description)

  • Type: boolean
  • Required: No
  • Expression: ${appfuse.fullSource}
  • Default: false

sourceDirectory :

The directory containing the source code.

  • Type: java.lang.String
  • Required: No
  • Expression: ${appfuse.sourceDirectory}
  • Default: ${basedir}/target/appfuse/generated-sources

templateDirectory :

(no description)

  • Type: java.lang.String
  • Required: No
  • Expression: ${appfuse.templateDirectory}
  • Default: ${basedir}/src/test/resources