|
||||||||||
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.xmlbeans.AbstractXmlBeansPlugin
public abstract class AbstractXmlBeansPlugin
A Maven 2 plugin which parses xsd files and produces a corresponding object model based on the Apache XML Beans parser. The plugin produces two sets of output files referred to as generated sources and generated classes. The former is then compiled to the build
outputDirectory
. The latter is generated in this directory.
Note that the descriptions for the goal's parameters have been blatently
copied from http://xmlbeans.apache.org/docs/2.0.0/guide/antXmlbean.html for
convenience.
Field Summary | |
---|---|
protected File |
catalogLocation
The location of the catalog used to resolve xml entities. |
protected org.apache.maven.project.MavenProject |
project
A reference to the Maven Project metadata. |
Fields inherited from interface org.apache.maven.plugin.Mojo |
---|
ROLE |
Constructor Summary | |
---|---|
AbstractXmlBeansPlugin()
Empty constructor for the XML Beans plugin. |
Method Summary | |
---|---|
void |
execute()
Map the parameters to the schema compilers parameter object, make sure the necessary output directories exist, then call on the schema compiler to produce the java objects and supporting resources. |
abstract File |
getBaseDir()
Returns the directory where the schemas are located. |
String |
getCatalogFile()
Returns the name of the file used to resolve xml entities. |
File[] |
getClasspath()
Returns a classpath for the compiler made up of artifacts from the project. |
String |
getCompiler()
Returns null. |
File[] |
getConfigFiles()
Returns configuration files identified in the xmlConfigs string passed by the project configuration. |
abstract File |
getDefaultXmlConfigDir()
|
EntityResolver |
getEntityResolver()
Returns a null entity resolver. |
Collection |
getErrorListeners()
Returns an empty collection the compiler will store error message Strings in. |
List |
getExtensions()
Todo: Not certain of the purpose of this. |
File |
getGeneratedClassesDirectory()
Returns the class directory of the project. |
protected abstract File |
getGeneratedSchemaDirectory()
|
File |
getGeneratedSourceDirectory()
Returns the directory for saving generated source files. |
File[] |
getJavaFiles()
An array of other source files. |
String |
getJavaSource()
Returns the javasource parameter which specifies an option to the XmlBeans code generator. |
Set |
getMdefNamespaces()
Returns null at this time. |
String |
getMemoryInitialSize()
Returns the initial size of the memory allocation for the schema compile process. |
String |
getMemoryMaximumSize()
Returns the maximum size of the memory allocation for the schema compile process. |
String |
getName()
Returns null at this time. |
File |
getOutputJar()
Returns the location of the output jar file should one be produced. |
String |
getRepackage()
Todo: Not certain of the purpose of this. |
abstract File |
getSchemaDirectory()
Returns the directory where the schemas are located. |
abstract File |
getStaleFile()
|
File[] |
getWsdlFiles()
Returns a file array of wsdl files to translate to object models. |
File[] |
getXsdFiles()
Returns a file array of xsd files to translate to object models. |
protected abstract List |
getXsdJars()
|
boolean |
hasCatalogFile()
Returns the name of the file used to resolve xml entities. |
boolean |
isDebug()
Returns the state of debuggin. |
boolean |
isDownload()
Returns true if dependencies are to be downloaded by the schema compiler. |
boolean |
isJaxb()
Returns true if jaxb is set. |
boolean |
isNoAnn()
If true, annotations in the schema are ignored |
boolean |
isNoJavac()
Returns True if generated source files are not to be compiled. |
boolean |
isNoPvr()
Do not enforce the particle valid (restriction) rule if true. |
boolean |
isNoUpa()
If true, do not enforce the unique particle attribution rule. |
boolean |
isNoVDoc()
If true, documentation elements in the source schema are ignored. |
boolean |
isQuiet()
Returns true if the schema compiler should reduce verbosity. |
boolean |
isVerbose()
Returns true if the schema compiler should increase verbosity. |
protected abstract void |
updateProject(org.apache.maven.project.MavenProject project,
org.apache.xmlbeans.impl.tool.SchemaCompiler.Parameters compilerParams,
boolean stale)
|
void |
validate()
No validation beyond those done by the maven plugin occur at this time. |
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 |
---|
protected File catalogLocation
protected org.apache.maven.project.MavenProject project
Constructor Detail |
---|
public AbstractXmlBeansPlugin()
Method Detail |
---|
public final void execute() throws org.apache.maven.plugin.MojoExecutionException
execute
in interface org.apache.maven.plugin.Mojo
org.apache.maven.plugin.MojoExecutionException
- Errors occurred during compile.protected abstract void updateProject(org.apache.maven.project.MavenProject project, org.apache.xmlbeans.impl.tool.SchemaCompiler.Parameters compilerParams, boolean stale) throws org.apache.maven.artifact.DependencyResolutionRequiredException, XmlBeansException
org.apache.maven.artifact.DependencyResolutionRequiredException
XmlBeansException
protected abstract List getXsdJars()
protected abstract File getGeneratedSchemaDirectory()
public abstract File getBaseDir()
public abstract File getStaleFile()
public abstract File getDefaultXmlConfigDir()
public abstract File getSchemaDirectory()
public final File[] getClasspath() throws org.apache.maven.artifact.DependencyResolutionRequiredException
org.apache.maven.artifact.DependencyResolutionRequiredException
- Maven Dependencies weren't resolved.public final String getCompiler()
public final File[] getConfigFiles() throws XmlBeansException
XmlBeansException
public final EntityResolver getEntityResolver()
public final Collection getErrorListeners()
public final List getExtensions()
public final File[] getJavaFiles()
public final Set getMdefNamespaces()
public final String getJavaSource()
public final String getMemoryInitialSize()
public final String getMemoryMaximumSize()
public final String getName()
public final File getOutputJar()
public final String getRepackage()
public final boolean hasCatalogFile()
public final String getCatalogFile()
public final File[] getXsdFiles() throws XmlBeansException
XmlBeansException
public final File[] getWsdlFiles() throws XmlBeansException
XmlBeansException
public final boolean isDebug()
public final boolean isDownload()
public final boolean isJaxb()
public final boolean isNoAnn()
public final boolean isNoVDoc()
public final boolean isNoJavac()
public final boolean isNoPvr()
public final boolean isNoUpa()
public final boolean isQuiet()
public final boolean isVerbose()
public final void validate() throws XmlBeansException
XmlBeansException
- Currently not used.public File getGeneratedSourceDirectory()
public File getGeneratedClassesDirectory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |