org.appfuse.mojo.exporter
Class ModelGeneratorMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.appfuse.mojo.HibernateExporterMojo
org.appfuse.mojo.exporter.ModelGeneratorMojo
- All Implemented Interfaces:
- org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.codehaus.mojo.hibernate3.ExporterMojo
public class ModelGeneratorMojo
- extends HibernateExporterMojo
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
- Version:
- $Id: ModelGeneratorMojo.java 3535 2007-03-07 21:02:07Z jreyes $
- Author:
- Johann Reyes
| Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
|
Method Summary |
protected org.hibernate.tool.hbm2x.Exporter |
configureExporter(org.hibernate.tool.hbm2x.Exporter exp)
Configures the Exporter. |
protected org.hibernate.tool.hbm2x.Exporter |
createExporter()
Instantiates a org.hibernate.tool.hbm2x.POJOExporter object. |
void |
execute()
|
String |
getName()
Returns gen-model. |
| Methods inherited from class org.apache.maven.plugin.AbstractMojo |
getLog, getPluginContext, setLog, setPluginContext |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.maven.plugin.Mojo |
getLog, setLog |
ModelGeneratorMojo
public ModelGeneratorMojo()
- Default constructor.
getName
public String getName()
- Returns gen-model.
- Returns:
- String goal's name
execute
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
- Specified by:
execute in interface org.apache.maven.plugin.Mojo- Overrides:
execute in class HibernateExporterMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException- See Also:
Mojo.execute()
configureExporter
protected org.hibernate.tool.hbm2x.Exporter configureExporter(org.hibernate.tool.hbm2x.Exporter exp)
throws org.apache.maven.plugin.MojoExecutionException
- Description copied from class:
HibernateExporterMojo
- Configures the Exporter.
- Overrides:
configureExporter in class HibernateExporterMojo
- Parameters:
exp - Exporter to configure
- Returns:
- Exporter
- Throws:
org.apache.maven.plugin.MojoExecutionException - if there is an error configuring the exporter- See Also:
HibernateExporterMojo.configureExporter(org.hibernate.tool.hbm2x.Exporter)
createExporter
protected org.hibernate.tool.hbm2x.Exporter createExporter()
- Instantiates a org.hibernate.tool.hbm2x.POJOExporter object.
- Specified by:
createExporter in class HibernateExporterMojo
- Returns:
- POJOExporter
Copyright © 2003-2012. All Rights Reserved.