org.apache.torque.mojo
Class DataDtdMojo

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.TexenTaskMojo
                  extended by org.apache.torque.mojo.DataModelTaskMojo
                      extended by org.apache.torque.mojo.DataDtdMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class DataDtdMojo
extends DataModelTaskMojo

Generates a DTD for the database tables from a schema XML file


Field Summary
static String PROJECT_CONTEXT_PROPERTY
          The context property for the name of the project.
 
Fields inherited from class org.apache.torque.mojo.DataModelTaskMojo
TARGET_DATABASE_CONTEXT_PROPERTY
 
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
DataDtdMojo()
           
 
Method Summary
protected  void configureTask()
          Configures the Texen task wrapped by this mojo
 void executeMojo()
          Executes the wrapped Texen task.
 String getArtifactId()
           
protected  String getControlTemplate()
          Returns the path to the control template.
 String getCopyToFile()
           
protected  org.apache.commons.configuration.PropertiesConfiguration getMojoContextProperties()
          Returns the context properties for the Texen task.
 String getProjectName()
          Returns the name of the project
 String getSchemaXMLFile()
          Returns the name of the xml file to process.
 boolean isAntCompatibilityMode()
           
 void setAntCompatibilityMode(boolean antCompatibilityMode)
           
 void setArtifactId(String artifactId)
           
 void setCopyToFile(String copyToFile)
           
 void setProjectName(String projectName)
          Sets the name of the project
 void setSchemaXMLFile(String xmlFile)
          Sets the name of the xml file to process.
protected  void showConfig()
           
 
Methods inherited from class org.apache.torque.mojo.DataModelTaskMojo
addTargetDatabaseToOutputDir, addTargetDatabaseToReportFile, getAntFileSet, getCanonicalReportFile, getInvalidTargetDatabaseMessage, getReportFile, getSchemaDir, getSchemaExcludes, getSchemaFiles, getSchemaIncludes, getSqlDbMap, getSuffix, getTargetDatabase, getTargetPackage, getUrl, isRunOnlyOnSchemaChange, setReportFile, setRunOnlyOnSchemaChange, setSchemaDir, setSchemaExcludes, setSchemaIncludes, setSqlDbMap, setSuffix, setTargetDatabase, setTargetPackage, setUrl, updateConfiguration, validateConfiguration
 
Methods inherited from class org.apache.torque.mojo.TexenTaskMojo
generateContextProperties, getContextPropertiesPath, getGeneratorTask, getOutputDir, getTemplatePath, getUseClasspath, getUserContextProperties, setContextPropertiesPath, setOutputDir, setTemplatePath, setUseClasspath, setUserContextProperties
 
Methods inherited from class org.apache.torque.mojo.AntTaskMojo
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

PROJECT_CONTEXT_PROPERTY

public static final String PROJECT_CONTEXT_PROPERTY
The context property for the name of the project.

See Also:
Constant Field Values
Constructor Detail

DataDtdMojo

public DataDtdMojo()
Method Detail

getMojoContextProperties

protected org.apache.commons.configuration.PropertiesConfiguration getMojoContextProperties()
Returns the context properties for the Texen task.

Specified by:
getMojoContextProperties in class TexenTaskMojo
Returns:
The PropertiesConfiguration containing all context properties, not null.

showConfig

protected void showConfig()

configureTask

protected void configureTask()
                      throws org.apache.maven.plugin.MojoExecutionException
Configures the Texen task wrapped by this mojo

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

getControlTemplate

protected String getControlTemplate()
Returns the path to the control template.

Specified by:
getControlTemplate in class DataModelTaskMojo
Returns:
"data/Control.vm"

getProjectName

public String getProjectName()
Returns the name of the project

Returns:
the name of the project.

setProjectName

public void setProjectName(String projectName)
Sets the name of the project

Parameters:
project - the name of the project.

getSchemaXMLFile

public String getSchemaXMLFile()
Returns the name of the xml file to process.

Returns:
the name of the xml file to process.

setSchemaXMLFile

public void setSchemaXMLFile(String xmlFile)
Sets the name of the xml file to process.

Parameters:
project - the name of the xml file to process.

executeMojo

public void executeMojo()
                 throws org.apache.maven.plugin.MojoExecutionException
Description copied from class: TexenTaskMojo
Executes the wrapped Texen task. Before this is done, the context properties file is generated and the Texen task is configured.

Overrides:
executeMojo in class TexenTaskMojo
Throws:
org.apache.maven.plugin.MojoExecutionException - if an error occurs during execution.
See Also:
Mojo.execute()

isAntCompatibilityMode

public boolean isAntCompatibilityMode()

setAntCompatibilityMode

public void setAntCompatibilityMode(boolean antCompatibilityMode)

getCopyToFile

public String getCopyToFile()

setCopyToFile

public void setCopyToFile(String copyToFile)

getArtifactId

public String getArtifactId()

setArtifactId

public void setArtifactId(String artifactId)


Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.