|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
org.jvnet.jaxb2.maven2.AbstractXJC2Mojo<O>
public abstract class AbstractXJC2Mojo<O>
Field Summary | |
---|---|
protected String |
catalogResolver
|
protected org.apache.maven.model.Dependency[] |
plugins
|
Fields inherited from interface org.apache.maven.plugin.Mojo |
---|
ROLE |
Constructor Summary | |
---|---|
AbstractXJC2Mojo()
|
Method Summary | |
---|---|
protected List<URL> |
createResourceEntryUrls(ResourceEntry resourceEntry,
String defaultDirectory,
String[] defaultIncludes,
String[] defaultExcludes)
|
boolean |
getAddCompileSourceRoot()
|
boolean |
getAddTestCompileSourceRoot()
|
List<String> |
getArgs()
A list of extra XJC's command-line arguments (items must include the dash '-'). |
org.apache.maven.artifact.factory.ArtifactFactory |
getArtifactFactory()
Used internally to resolve plugins to their jar files. |
org.apache.maven.artifact.metadata.ArtifactMetadataSource |
getArtifactMetadataSource()
|
org.apache.maven.artifact.resolver.ArtifactResolver |
getArtifactResolver()
|
File |
getBindingDirectory()
The source directory containing the *.xjb binding files. |
String[] |
getBindingExcludes()
A list of regular expression file search patterns to specify the binding files to be excluded from the bindingIncludes . |
String[] |
getBindingIncludes()
A list of regular expression file search patterns to specify the binding files to be processed. |
ResourceEntry[] |
getBindings()
A list of binding resources which could includes file sets, URLs, Maven artifact resources. |
File |
getCatalog()
Specify the catalog file to resolve external entity references (xjc's -catalog option) |
String |
getCatalogResolver()
Provides the class name of the catalog resolver. |
protected URL |
getCatalogURL()
|
List |
getClasspathElements()
Project classpath. |
boolean |
getDebug()
If 'true', the XJC compiler is set to debug mode (xjc's -debug option). |
boolean |
getDisableDefaultExcludes()
If 'true', maven's default exludes are NOT added to all the excludes lists. |
boolean |
getEpisode()
|
File |
getEpisodeFile()
|
org.apache.maven.model.Dependency[] |
getEpisodes()
|
boolean |
getExtension()
If 'true', the XJC binding compiler will run in the extension mode (xjc's -extension option). |
boolean |
getForceRegenerate()
If 'true', no up-to-date check is performed and the XJC always re-generates the sources. |
File |
getGenerateDirectory()
Generated code will be written under this directory. |
String |
getGeneratePackage()
The generated classes will all be placed under this Java package (xjc's -p option), unless otherwise specified in the schemas. |
org.apache.maven.artifact.repository.ArtifactRepository |
getLocalRepository()
|
org.apache.maven.project.MavenProjectBuilder |
getMavenProjectBuilder()
Artifact factory, needed to download source jars. |
protected abstract OptionsFactory<O> |
getOptionsFactory()
|
File[] |
getOtherDepends()
A list of of input files or URLs to consider during the up-to-date. |
List<org.apache.maven.artifact.Artifact> |
getPluginArtifacts()
|
org.apache.maven.model.Dependency[] |
getPlugins()
XJC plugins to be made available to XJC. |
String[] |
getProduces()
|
org.apache.maven.project.MavenProject |
getProject()
|
boolean |
getReadOnly()
If 'true', the generated Java source files are set as read-only (xjc's -readOnly option). |
boolean |
getRemoveOldOutput()
If 'true', the [generateDirectory] dir will be deleted before the XJC binding compiler recompiles the source files. |
File |
getSchemaDirectory()
The source directory containing *.xsd schema files. |
String[] |
getSchemaExcludes()
A list of regular expression file search patterns to specify the schemas to be excluded from the schemaIncludes list. |
String[] |
getSchemaIncludes()
A list of regular expression file search patterns to specify the schemas to be processed. |
String |
getSchemaLanguage()
Type of input schema language. |
ResourceEntry[] |
getSchemas()
A list of schema resources which could includes file sets, URLs, Maven artifact resources. |
String |
getSpecVersion()
|
boolean |
getStrict()
If 'true', Perform strict validation of the input schema (xjc's -nv option). |
boolean |
getVerbose()
If 'true', the plugin and the XJC compiler are both set to verbose mode (xjc's -verbose option). |
boolean |
getWriteCode()
If 'false', the plugin will not write the generated code to disk. |
protected void |
logApiConfiguration()
|
protected void |
logConfiguration()
|
void |
setAddCompileSourceRoot(boolean addCompileSourceRoot)
|
void |
setAddTestCompileSourceRoot(boolean addTestCompileSourceRoot)
|
void |
setArgs(List<String> args)
|
void |
setArtifactFactory(org.apache.maven.artifact.factory.ArtifactFactory artifactFactory)
|
void |
setArtifactMetadataSource(org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource)
|
void |
setArtifactResolver(org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver)
|
void |
setBindingDirectory(File bindingDirectory)
|
void |
setBindingExcludes(String[] bindingExcludes)
|
void |
setBindingIncludes(String[] bindingIncludes)
|
void |
setBindings(ResourceEntry[] bindings)
|
void |
setCatalog(File catalog)
|
void |
setCatalogResolver(String catalogResolver)
|
void |
setClasspathElements(List classpathElements)
|
void |
setDebug(boolean debug)
|
void |
setDisableDefaultExcludes(boolean disableDefaultExcludes)
|
void |
setEpisode(boolean episode)
|
void |
setEpisodeFile(File episodeFile)
|
void |
setEpisodes(org.apache.maven.model.Dependency[] episodes)
|
void |
setExtension(boolean extension)
|
void |
setForceRegenerate(boolean forceRegenerate)
|
void |
setGenerateDirectory(File generateDirectory)
|
void |
setGeneratePackage(String generatePackage)
|
void |
setLocalRepository(org.apache.maven.artifact.repository.ArtifactRepository localRepository)
|
void |
setMavenProjectBuilder(org.apache.maven.project.MavenProjectBuilder mavenProjectBuilder)
|
void |
setOtherDepends(File[] otherDepends)
|
void |
setPluginArtifacts(List<org.apache.maven.artifact.Artifact> plugingArtifacts)
|
void |
setPlugins(org.apache.maven.model.Dependency[] plugins)
|
void |
setProduces(String[] produces)
|
void |
setProject(org.apache.maven.project.MavenProject project)
|
void |
setReadOnly(boolean readOnly)
|
void |
setRemoveOldOutput(boolean removeOldOutput)
|
void |
setSchemaDirectory(File schemaDirectory)
|
void |
setSchemaExcludes(String[] schemaExcludes)
|
void |
setSchemaIncludes(String[] schemaIncludes)
|
void |
setSchemaLanguage(String schemaLanguage)
|
void |
setSchemas(ResourceEntry[] schemas)
|
void |
setSpecVersion(String specVersion)
|
void |
setStrict(boolean strict)
|
void |
setVerbose(boolean verbose)
|
void |
setWriteCode(boolean writeCode)
|
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 |
---|
execute |
Field Detail |
---|
protected String catalogResolver
protected org.apache.maven.model.Dependency[] plugins
Constructor Detail |
---|
public AbstractXJC2Mojo()
Method Detail |
---|
public String getSchemaLanguage()
public void setSchemaLanguage(String schemaLanguage)
public File getSchemaDirectory()
public void setSchemaDirectory(File schemaDirectory)
public String[] getSchemaIncludes()
A list of regular expression file search patterns to specify the schemas
to be processed. Searching is based from the root of
schemaDirectory
.
If left udefined, then all *.xsd files in schemaDirectory will be processed.
public void setSchemaIncludes(String[] schemaIncludes)
public String[] getSchemaExcludes()
schemaIncludes
list. Searching is
based from the root of schemaDirectory.
public void setSchemaExcludes(String[] schemaExcludes)
public ResourceEntry[] getSchemas()
public void setSchemas(ResourceEntry[] schemas)
public void setBindingDirectory(File bindingDirectory)
public File getBindingDirectory()
The source directory containing the *.xjb binding files.
If left undefined, then the schemaDirectory
is assumed.
public String[] getBindingIncludes()
A list of regular expression file search patterns to specify the binding
files to be processed. Searching is based from the root of
bindingDirectory
.
If left undefined, then all *.xjb files in schemaDirectory will be processed.
public void setBindingIncludes(String[] bindingIncludes)
public String[] getBindingExcludes()
bindingIncludes
. Searching is
based from the root of bindingDirectory.
public void setBindingExcludes(String[] bindingExcludes)
public ResourceEntry[] getBindings()
public void setBindings(ResourceEntry[] bindings)
public boolean getDisableDefaultExcludes()
public void setDisableDefaultExcludes(boolean disableDefaultExcludes)
public File getCatalog()
Support TR9401, XCatalog, and OASIS XML Catalog format. See the catalog-resolver sample and this article for details.
public void setCatalog(File catalog)
protected URL getCatalogURL() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public String getCatalogResolver()
public void setCatalogResolver(String catalogResolver)
public String getGeneratePackage()
The generated classes will all be placed under this Java package (xjc's -p option), unless otherwise specified in the schemas.
If left unspecified, the package will be derived from the schemas only.
public void setGeneratePackage(String generatePackage)
public File getGenerateDirectory()
Generated code will be written under this directory.
For instance, if you specify generateDirectory="doe/ray"
and
generatePackage="org.here"
, then files are generated to
doe/ray/org/here
.
public void setGenerateDirectory(File generateDirectory)
public boolean getAddCompileSourceRoot()
public void setAddCompileSourceRoot(boolean addCompileSourceRoot)
public boolean getAddTestCompileSourceRoot()
public void setAddTestCompileSourceRoot(boolean addTestCompileSourceRoot)
public boolean getReadOnly()
public void setReadOnly(boolean readOnly)
public boolean getExtension()
public void setExtension(boolean extension)
public boolean getStrict()
public void setStrict(boolean strict)
public boolean getWriteCode()
public void setWriteCode(boolean writeCode)
public boolean getVerbose()
If 'true', the plugin and the XJC compiler are both set to verbose mode (xjc's -verbose option).
It is automatically set to 'true' when maven is run in debug mode (mvn's -X option).
public void setVerbose(boolean verbose)
public boolean getDebug()
If 'true', the XJC compiler is set to debug mode (xjc's -debug option).
It is automatically set to 'true' when maven is run in debug mode (mvn's -X option).
public void setDebug(boolean debug)
public List<String> getArgs()
A list of extra XJC's command-line arguments (items must include the dash '-').
Arguments set here take precedence over other mojo parameters.
public void setArgs(List<String> args)
public boolean getForceRegenerate()
public void setForceRegenerate(boolean forceRegenerate)
public boolean getRemoveOldOutput()
If 'true', the [generateDirectory] dir will be deleted before the XJC binding compiler recompiles the source files.
Note that if set to 'false', the up-to-date check might not work, since XJC does not regenerate all files (i.e. files for "any" elements under 'xjc/org/w3/_2001/xmlschema' directory).
public void setRemoveOldOutput(boolean removeOldOutput)
public String[] getProduces()
public void setProduces(String[] produces)
public File[] getOtherDepends()
public void setOtherDepends(File[] otherDepends)
public File getEpisodeFile()
public void setEpisodeFile(File episodeFile)
public boolean getEpisode()
public void setEpisode(boolean episode)
public List getClasspathElements()
public void setClasspathElements(List classpathElements)
public org.apache.maven.model.Dependency[] getPlugins()
public void setPlugins(org.apache.maven.model.Dependency[] plugins)
public org.apache.maven.model.Dependency[] getEpisodes()
public void setEpisodes(org.apache.maven.model.Dependency[] episodes)
public String getSpecVersion()
public void setSpecVersion(String specVersion)
protected void logConfiguration() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public org.apache.maven.project.MavenProject getProject()
public void setProject(org.apache.maven.project.MavenProject project)
public org.apache.maven.artifact.resolver.ArtifactResolver getArtifactResolver()
public void setArtifactResolver(org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver)
public org.apache.maven.artifact.metadata.ArtifactMetadataSource getArtifactMetadataSource()
public void setArtifactMetadataSource(org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource)
public org.apache.maven.artifact.factory.ArtifactFactory getArtifactFactory()
plugins
to their jar files.
public void setArtifactFactory(org.apache.maven.artifact.factory.ArtifactFactory artifactFactory)
public org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()
public void setLocalRepository(org.apache.maven.artifact.repository.ArtifactRepository localRepository)
public org.apache.maven.project.MavenProjectBuilder getMavenProjectBuilder()
public void setMavenProjectBuilder(org.apache.maven.project.MavenProjectBuilder mavenProjectBuilder)
protected void logApiConfiguration()
public List<org.apache.maven.artifact.Artifact> getPluginArtifacts()
public void setPluginArtifacts(List<org.apache.maven.artifact.Artifact> plugingArtifacts)
protected List<URL> createResourceEntryUrls(ResourceEntry resourceEntry, String defaultDirectory, String[] defaultIncludes, String[] defaultExcludes) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected abstract OptionsFactory<O> getOptionsFactory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |