public abstract class AbstractXjcMojo
extends org.apache.maven.plugin.AbstractMojo
Modifier and Type | Field and Description |
---|---|
protected String |
arguments
Space separated string of extra arguments, for instance
-Xfluent-api -episode somefile ; These
will be passed on to XJC as "-Xfluent-api" "-episode" "somefile" options. |
protected String |
bindingFiles
List of files to use for bindings, comma delimited.
|
protected File |
catalog
Catalog file to resolve external entity references.
|
protected boolean |
clearOutputDir
Clears the output directory on each run.
|
protected boolean |
dtd
Treat input schemas as XML DTD (experimental, unsupported).
|
protected boolean |
explicitAnnotation
Allow generation of explicit annotations that are needed for JAXB2 to work on RetroTranslator.
|
protected boolean |
extension
Allow to use the JAXB Vendor Extensions.
|
protected boolean |
failOnNoSchemas
Fails the mojo if no schemas are found.
|
protected File |
generatedResourcesDirectory
The optional directory where generated resources can be placed, generated by addons/plugins.
|
protected String |
httpproxy
Set HTTP/HTTPS proxy.
|
protected String |
includeSchemasOutputPath
The output path to include in your jar/war/etc if you wish to include your schemas in your artifact.
|
protected boolean |
npa
Suppress generation of package level annotations (package-info.java).
|
protected boolean |
nv
Do not perform strict validation of the input schema(s).
|
protected String |
packageName
The package under which the source files will be generated.
|
protected boolean |
quiet
Suppress compiler output.
|
protected boolean |
readOnly
Deprecated.
Not suitable for a Maven build.
|
protected boolean |
relaxng
Treat input schemas as RELAX NG (experimental, unsupported).
|
protected boolean |
relaxngCompact
Treat input as RELAX NG compact syntax (experimental, unsupported).
|
protected String |
schemaFiles
List of files to use for schemas, comma delimited.
|
protected String |
schemaListFileName
A filename containing the list of files to use for schemas, comma delimited.
|
protected String |
target
Specifies the runtime environment in which the generated code is supposed to run, if older than the
JAXB version used by the plugin (for example "2.0" or "2.1").
|
protected boolean |
verbose
Be extra verbose.
|
protected boolean |
wsdl
Treat input as WSDL and compile schemas inside it (experimental, unsupported).
|
protected boolean |
xmlschema
Treat input as W3C XML Schema (default).
|
Constructor and Description |
---|
AbstractXjcMojo() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addCompileSourceRoot(org.apache.maven.project.MavenProject project) |
protected abstract void |
addResource(org.apache.maven.project.MavenProject project,
org.apache.maven.model.Resource resource) |
protected void |
copyXSDs(File targetBaseDir) |
void |
execute() |
protected abstract File |
getBindingDirectory() |
File[] |
getBindingFiles()
Returns a file array of xjb files to translate to object models.
|
protected abstract List<String> |
getClasspathElements(org.apache.maven.project.MavenProject project) |
protected abstract File |
getOutputDirectory() |
protected abstract File |
getSchemaDirectory() |
protected void |
getSchemasFromFileListing(List<URL> files)
Gets all the entries in the given schemaListFileName and adds them to the list
of files to send to xjc.
|
protected abstract String |
getStaleFileExtensionSuffix() |
URL[] |
getXSDFiles()
Returns a file array of xsd files to translate to object models.
|
@Parameter protected File generatedResourcesDirectory
@Parameter protected String packageName
@Parameter protected File catalog
@Parameter protected String httpproxy
@Parameter protected String bindingFiles
@Parameter protected String schemaFiles
@Parameter protected String schemaListFileName
@Parameter(defaultValue="false") protected boolean dtd
@Parameter(defaultValue="false") protected boolean npa
@Parameter(defaultValue="false") protected boolean nv
@Parameter(defaultValue="false") protected boolean relaxng
@Parameter(defaultValue="false") protected boolean relaxngCompact
@Parameter(defaultValue="false") protected boolean quiet
@Deprecated @Parameter(defaultValue="false") protected boolean readOnly
@Parameter(property="xjc.verbose", defaultValue="false") protected boolean verbose
@Parameter(defaultValue="false") protected boolean wsdl
@Parameter(defaultValue="true") protected boolean xmlschema
@Parameter(defaultValue="false") protected boolean extension
@Parameter(defaultValue="false") protected boolean explicitAnnotation
@Parameter(property="xjc.arguments") protected String arguments
-Xfluent-api -episode somefile
; These
will be passed on to XJC as "-Xfluent-api" "-episode" "somefile"
options.@Parameter protected String includeSchemasOutputPath
@Parameter(defaultValue="true") protected boolean clearOutputDir
@Parameter protected String target
@Parameter(defaultValue="true") protected boolean failOnNoSchemas
public void execute() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected abstract void addCompileSourceRoot(org.apache.maven.project.MavenProject project)
protected abstract void addResource(org.apache.maven.project.MavenProject project, org.apache.maven.model.Resource resource)
protected void copyXSDs(File targetBaseDir) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected void getSchemasFromFileListing(List<URL> files) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
- if an error occurspublic final File[] getBindingFiles()
public final URL[] getXSDFiles() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected abstract String getStaleFileExtensionSuffix()
protected abstract File getOutputDirectory()
protected abstract File getSchemaDirectory()
protected abstract File getBindingDirectory()
Copyright © 2005–2016 Codehaus. All rights reserved.