jaxb2-maven-plugin
来源:互联网 发布:数控铣床编程与加工 编辑:程序博客网 时间:2024/06/03 09:27
http://mojo.codehaus.org/jaxb2-maven-plugin/xjc-mojo.html
jaxb2:xjc
Full name:
org.codehaus.mojo:jaxb2-maven-plugin:1.5:xjc
Description:
Attributes:
- Requires a Maven project to be executed.
- Requires dependency resolution of artifacts in scope: runtime.
- Binds by default to the lifecycle phase: generate-sources.
Required Parameters
Default value is: ${project.build.directory}/generated-sources/jaxb.schemaDirectoryFile-The directory for XML Schema files (XSDs).
Default value is: ${project.basedir}/src/main/xsd.staleFileFile-The location of the flag file used to determine if the output is stale.
Default value is: ${project.build.directory}/jaxb2/.xjcStaleFlag.
Optional Parameters
Default value is: ${project.basedir}/src/main/xjb.bindingFilesString-List of files to use for bindings, comma delimited. If none, then all xjb files are used in the bindingDirectory.catalogFile-Catalog file to resolve external entity references. Supports TR9401, XCatalog, and OASIS XML Catalog format.clearOutputDirboolean-Clears the output directory on each run. Defaults to 'true' but if false, will not clear the directory.
Default value is: true.dtdboolean-Treat input schemas as XML DTD (experimental, unsupported).
Default value is: false.enableIntrospectionboolean1.4Enable correct generation of Boolean getters/setters to enable Bean Introspection apis.
Default value is: false.encodingString-The character encoding for the generated Java source files.
Default value is: ${project.build.sourceEncoding}.explicitAnnotationboolean-Allow generation of explicit annotations that are needed for JAXB2 to work on RetroTranslator.
Default value is: false.extensionboolean-Allow to use the JAXB Vendor Extensions.
Default value is: false.failOnNoSchemasboolean1.3Fails the mojo if no schemas are found.
Default value is: true.generatedResourcesDirectoryFile-The optional directory where generated resources can be placed, generated by addons/plugins.httpproxyString-Set HTTP/HTTPS proxy. Format is [user[:password]@]proxyHost[:proxyPort]includeSchemasOutputPathString-The output path to include in your jar/war/etc if you wish to include your schemas in your artifact.npaboolean-Suppress generation of package level annotations (package-info.java).
Default value is: false.nvboolean-Do not perform strict validation of the input schema(s).
Default value is: false.packageNameString-The package under which the source files will be generated.quietboolean-Suppress compiler output.
Default value is: false.readOnlyboolean-Deprecated. Not suitable for a Maven build.
Default value is: false.relaxngboolean-Treat input schemas as RELAX NG (experimental, unsupported).
Default value is: false.relaxngCompactboolean-Treat input as RELAX NG compact syntax (experimental, unsupported).
Default value is: false.schemaFilesString-List of files to use for schemas, comma delimited. If none, then all xsd files are used in the schemaDirectory. This parameter also accepts Ant-style file patterns.
Note: you can only use either the 'schemaFiles' or the 'schemaListFileName' option (you may not use both at once!).schemaListFileNameString-A filename containing the list of files to use for schemas, comma delimited. If none, then all xsd files are used in the schemaDirectory.
Note: you can only use either the 'schemaFiles' or the 'schemaListFileName' option (you may not use both at once!).targetString1.3Specifies 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"). This will create generated code that doesn't use any newer JAXB features. Thus, allowing the generated code to run with an earlier JAXB 2.x runtime.verboseboolean-Be extra verbose.
Default value is: false.wsdlboolean-Treat input as WSDL and compile schemas inside it (experimental, unsupported).
Default value is: false.xmlschemaboolean-Treat input as W3C XML Schema (default).
Default value is: true.
Parameter Details
arguments:
- Type: java.lang.String
- Required: No
- Expression: ${xjc.arguments}
bindingDirectory:
- Type: java.io.File
- Required: No
- Default: ${project.basedir}/src/main/xjb
bindingFiles:
- Type: java.lang.String
- Required: No
catalog:
- Type: java.io.File
- Required: No
clearOutputDir:
- Type: boolean
- Required: No
- Default: true
dtd:
- Type: boolean
- Required: No
- Default: false
enableIntrospection:
- Type: boolean
- Since: 1.4
- Required: No
- Default: false
encoding:
- Type: java.lang.String
- Required: No
- Default: ${project.build.sourceEncoding}
explicitAnnotation:
- Type: boolean
- Required: No
- Default: false
extension:
- Type: boolean
- Required: No
- Default: false
failOnNoSchemas:
- Type: boolean
- Since: 1.3
- Required: No
- Default: true
generatedResourcesDirectory:
- Type: java.io.File
- Required: No
httpproxy:
- Type: java.lang.String
- Required: No
includeSchemasOutputPath:
- Type: java.lang.String
- Required: No
npa:
- Type: boolean
- Required: No
- Default: false
nv:
- Type: boolean
- Required: No
- Default: false
outputDirectory:
- Type: java.io.File
- Required: Yes
- Default: ${project.build.directory}/generated-sources/jaxb
packageName:
- Type: java.lang.String
- Required: No
quiet:
- Type: boolean
- Required: No
- Default: false
readOnly:
- Type: boolean
- Required: No
- Default: false
relaxng:
- Type: boolean
- Required: No
- Default: false
relaxngCompact:
- Type: boolean
- Required: No
- Default: false
schemaDirectory:
- Type: java.io.File
- Required: Yes
- Default: ${project.basedir}/src/main/xsd
schemaFiles:
Note: you can only use either the 'schemaFiles' or the 'schemaListFileName' option (you may not use both at once!).
- Type: java.lang.String
- Required: No
schemaListFileName:
Note: you can only use either the 'schemaFiles' or the 'schemaListFileName' option (you may not use both at once!).
- Type: java.lang.String
- Required: No
staleFile:
- Type: java.io.File
- Required: Yes
- Default: ${project.build.directory}/jaxb2/.xjcStaleFlag
target:
- Type: java.lang.String
- Since: 1.3
- Required: No
verbose:
- Type: boolean
- Required: No
- Expression: ${xjc.verbose}
- Default: false
wsdl:
- Type: boolean
- Required: No
- Default: false
xmlschema:
- Type: boolean
- Required: No
- Default: true
=============================example
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.3.1</version>
<executions>
<execution>
<id>schema1-xjc</id>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<schemaFiles>Transaction.xsd</schemaFiles>
<packageName>com.xxx.domain</packageName> <!-- The name of your generated source package -->
<staleFile>${project.build.directory}/jaxb2/.schema1XjcStaleFlag</staleFile>
</configuration>
</execution>
<execution>
<id>schema2-xjc</id>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<schemaFiles>STModels.xsd</schemaFiles>
<packageName>com.xxx.st.domain</packageName> <!-- The name of your generated source package -->
<staleFile>${project.build.directory}/jaxb2/.schema2XjcStaleFlag</staleFile>
<clearOutputDir>false</clearOutputDir>
</configuration>
</execution>
</executions>
</plugin>
- jaxb2-maven-plugin
- jaxb2-maven-plugin使用说明
- Maven Plugin
- maven appassembler-maven-plugin
- maven:maven-assembly-plugin
- maven native2ascii-maven-plugin 例子
- cobertura-maven-plugin插件 maven
- maven搭配android-maven-plugin
- MAVEN ERROR maven-resources-plugin
- maven插件 buildnumber-maven-plugin
- Maven配置maven-compiler-plugin
- Maven插件:maven-javadoc-plugin
- maven配置tomcat-maven-plugin
- maven-plugins---maven-assembly-plugin
- [Maven]maven-shade-plugin使用指南
- Describing a Maven Plugin
- maven 常用命令和plugin
- Maven plugin 开发
- 制作支持MySql的Postfix包
- 【初学maven】helloword建立(二)
- 基于Java语言的51单片机串口通讯PC机程序
- ALV Call Transaction VK13 Using BDC
- Velocity模版引擎
- jaxb2-maven-plugin
- MyEclipse 6.5优化设置(图文)
- Power Strings POJ DC3
- Android SPP蓝牙传输
- Response.AddHeader使用实例
- 函数指针
- XHTML MP的语法规则
- nova-rootwrapper相关
- MFC的自定义消息(用户消息)的定义与使用