org.apache.torque.mojo
Class ExportMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.torque.mojo.BaseMojo
          extended by org.apache.torque.mojo.AntTaskMojo
              extended by org.apache.torque.mojo.ExportMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
ExportDataMojo, ExportSchemaMojo

public abstract class ExportMojo
extends AntTaskMojo

Base Mojo for export related functionality


Field Summary
private  boolean antCompatibilityMode
          If true, files will be exported in a format that the Ant impex tasks can understand
private  String artifactId
          The Maven artifactId.
private  String comment
          Additional comment that gets placed into the generated XML document.
private  String driver
          Database driver classname.
private  String excludes
          Comma separated list of regular expressions for tables to exclude from the export
private  String includes
          Comma separated list of regular expressions for tables to include in the export
private  boolean includeVersionInComment
          By default the version of the maven plugin being used during the build will be included as part of a comment in the XML.
private  String password
          The password for the database user.
private  String schema
          The schema to export.
private  String targetDatabase
          The type of database we are targeting (eg oracle, mysql).
private  String url
          The connect URL of the database.
private  String username
          The user name to connect to the database.
 
Fields inherited from class org.apache.torque.mojo.BaseMojo
FS, SKIP_PACKAGING_TYPE
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ExportMojo()
           
 
Method Summary
protected  void configureTask()
          Configures the Ant task which is wrapped by this mojo.
 String getArtifactId()
           
 String getComment()
           
 String getDriver()
          Returns the fully qualified class name of the database driver.
 String getExcludes()
           
 String getIncludes()
           
 String getPassword()
          Returns the password of the database user.
 String getSchema()
           
 String getTargetDatabase()
           
protected  String getUpdatedComment()
           
 String getUrl()
          Returns the connect URL to the database.
 String getUsername()
           
 boolean isAntCompatibilityMode()
           
 boolean isIncludeVersionInComment()
           
 void setAntCompatibilityMode(boolean antCompatibilityMode)
           
 void setArtifactId(String artifactId)
           
 void setComment(String comment)
           
 void setDriver(String driver)
          Sets the fully qualified class name of the database driver.
 void setExcludes(String excludePatterns)
           
 void setIncludes(String includePatterns)
           
 void setIncludeVersionInComment(boolean includeVersionInComment)
           
 void setPassword(String password)
          Sets the password of the database user.
 void setSchema(String schema)
           
 void setTargetDatabase(String targetDatabase)
           
 void setUrl(String url)
          Sets the connect URL to the database.
 void setUsername(String username)
           
 
Methods inherited from class org.apache.torque.mojo.AntTaskMojo
executeMojo, getAntProject, getAntTask, getIniatializedAntProject, setAntProject, setAntTask
 
Methods inherited from class org.apache.torque.mojo.BaseMojo
afterExecution, beforeExecution, execute, getEncoding, getMavenSession, getProject, getSettings, isForceMojoExecution, isSkip, isStartMavenLogger, setEncoding, setForceMojoExecution, setMavenSession, setProject, setSettings, setSkip, setStartMavenLogger, skipMojo
 
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
 

Field Detail

antCompatibilityMode

private boolean antCompatibilityMode
If true, files will be exported in a format that the Ant impex tasks can understand


artifactId

private String artifactId
The Maven artifactId. Included here as a simple property of the mojo itself to facilitate usage of BeanUtils.copyProperties() to copy properties between Mojo's and Ant tasks


includeVersionInComment

private boolean includeVersionInComment
By default the version of the maven plugin being used during the build will be included as part of a comment in the XML. Set this to false to prevent this. Useful if you are committing files to SCM and don't want a change in the version of the plugin to show up as a change to the data.


comment

private String comment
Additional comment that gets placed into the generated XML document. Anything included here gets appended to the default value
Default value is: Auto-generated by the maven-impex-plugin v1.0.2


includes

private String includes
Comma separated list of regular expressions for tables to include in the export


excludes

private String excludes
Comma separated list of regular expressions for tables to exclude from the export


targetDatabase

private String targetDatabase
The type of database we are targeting (eg oracle, mysql). This is optional if url is supplied as the database type will be automatically detected based on the url. If targetDatabase is explicitly supplied it will override the type selected by the automatic detection logic.


schema

private String schema
The schema to export. This parameter is optional, as the schema to export is automatically derived from platform specific logic that converts the artifactId.

For example:
ks-embedded-db becomes KSEMBEDDED for Oracle, and ksembedded for MySQL If schema is supplied, the supplied value will be used instead of the value derived from the artifactId


driver

private String driver
Database driver classname. This parameter is optional, as the correct JDBC driver to use is detected from the url in almost all cases (works for Oracle, MySQL, Derby, PostGresSQL, DB2, H2, HSQL, SQL Server). If a driver is explicitly supplied, it will be used in place of the JDBC driver the automatic detection logic would have chosen.


url

private String url
The connect URL of the database.


username

private String username
The user name to connect to the database. If not specified this is automatically generated by platform specific logic for converting the artifact id.

For example:
ks-embedded-db becomes KSEMBEDDED for Oracle and ksembedded for MySQL


password

private String password
The password for the database user. If not specified this is automatically generated by platform specific logic for converting the artifact id.

For example:
ks-embedded-db becomes KSEMBEDDED for Oracle and ksembedded for MySQL

Constructor Detail

ExportMojo

public ExportMojo()
Method Detail

getDriver

public String getDriver()
Returns the fully qualified class name of the database driver.


setDriver

public void setDriver(String driver)
Sets the fully qualified class name of the database driver.

Parameters:
driver - the fully qualified class name of the database driver.

getPassword

public String getPassword()
Returns the password of the database user.

Returns:
the password of the database user.

setPassword

public void setPassword(String password)
Sets the password of the database user.

Parameters:
password - the password of the database user.

getUrl

public String getUrl()
Returns the connect URL to the database.

Returns:
the connect URL to the database.

setUrl

public void setUrl(String url)
Sets the connect URL to the database.

Parameters:
url - the connect URL to the database.

getUsername

public String getUsername()

setUsername

public void setUsername(String username)

getSchema

public String getSchema()

setSchema

public void setSchema(String schema)

getTargetDatabase

public String getTargetDatabase()

setTargetDatabase

public void setTargetDatabase(String targetDatabase)

getIncludes

public String getIncludes()

setIncludes

public void setIncludes(String includePatterns)

getExcludes

public String getExcludes()

setExcludes

public void setExcludes(String excludePatterns)

getComment

public String getComment()

setComment

public void setComment(String comment)

getUpdatedComment

protected String getUpdatedComment()

configureTask

protected void configureTask()
                      throws org.apache.maven.plugin.MojoExecutionException
Description copied from class: AntTaskMojo
Configures the Ant task which is wrapped by this mojo.

Overrides:
configureTask in class AntTaskMojo
Throws:
org.apache.maven.plugin.MojoExecutionException

getArtifactId

public String getArtifactId()

setArtifactId

public void setArtifactId(String artifactId)

isAntCompatibilityMode

public boolean isAntCompatibilityMode()

setAntCompatibilityMode

public void setAntCompatibilityMode(boolean antCompatibilityMode)

isIncludeVersionInComment

public boolean isIncludeVersionInComment()
Returns:
the includeVersionInComment

setIncludeVersionInComment

public void setIncludeVersionInComment(boolean includeVersionInComment)
Parameters:
includeVersionInComment - the includeVersionInComment to set


Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.