|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.jpox.AbstractJpoxMojo
org.codehaus.mojo.jpox.AbstractJpoxSchemaMojo
public abstract class AbstractJpoxSchemaMojo
Extensions of this class implement the
prepareModeSpecificCommandLineArguments(Commandline)
method and
provide mode-specific arguments to the SchemaTool
invocation.
Following properties are at least required for the SchemaTool to execute:
javax.jdo.option.ConnectionDriverName
javax.jdo.option.ConnectionURL
javax.jdo.option.ConnectionUserName
javax.jdo.option.ConnectionPassword
SchemaTool properties can be specified in the POM configuration, or from command line. In case of conflicts, property values specified from command line take precedence.
An example JPOX-maven-plugin configuration can look like below:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jpox-maven-plugin</artifactId>
<version>${jpox.plugin.version}</version>
<configuration>
<outputFile>${project.build.directory}/schema.sql</outputFile>
<toolProperties>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>org.hsqldb.jdbcDriver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:hsqldb:mem:continuum</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>sa</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value></value>
</property>
<property>
<name>log4j.configuration</name>
<value>file:${basedir}/src/main/resources/log4j.properties</value>
</property>
<property>
<name>org.jpox.autoCreateTables</name>
<value>true</value>
</property>
</toolProperties>
</configuration>
</plugin>
Field Summary |
---|
Fields inherited from class org.codehaus.mojo.jpox.AbstractJpoxMojo |
---|
classes, pluginArtifacts |
Fields inherited from interface org.apache.maven.plugin.Mojo |
---|
ROLE |
Constructor Summary | |
---|---|
AbstractJpoxSchemaMojo()
|
Method Summary | |
---|---|
protected void |
executeJpoxTool(List pluginArtifacts,
URL log4jProperties,
List files)
Template method expected to be implemented by extensions. |
protected String |
getToolName()
Returns the Jpox tool name being invoked by this plugin's execution. |
protected abstract void |
prepareModeSpecificCommandLineArguments(org.codehaus.plexus.util.cli.Commandline cl)
Template method that sets up arguments for the SchemaTool
depending upon the mode invoked. |
Methods inherited from class org.codehaus.mojo.jpox.AbstractJpoxMojo |
---|
execute, findMappingFiles, getUniqueClasspathElements |
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 |
Constructor Detail |
---|
public AbstractJpoxSchemaMojo()
Method Detail |
---|
protected void executeJpoxTool(List pluginArtifacts, URL log4jProperties, List files) throws org.codehaus.plexus.util.cli.CommandLineException, org.apache.maven.plugin.MojoExecutionException
executeJpoxTool
in class AbstractJpoxMojo
org.codehaus.plexus.util.cli.CommandLineException
org.apache.maven.plugin.MojoExecutionException
AbstractJpoxMojo.executeJpoxTool(java.util.List,
java.net.URL, java.util.List)
protected abstract void prepareModeSpecificCommandLineArguments(org.codehaus.plexus.util.cli.Commandline cl)
SchemaTool
depending upon the mode invoked.
This is expected to be implemented by extensions.
cl
- Commandline
instance to set up arguments for.protected String getToolName()
getToolName
in class AbstractJpoxMojo
AbstractJpoxMojo.getToolName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |