-
Notifications
You must be signed in to change notification settings - Fork 99
Controlling the Output
highsource edited this page Dec 12, 2014
·
4 revisions
-
generateDirectory
- Target directory for the generated code,target/generated-sources/xjc
by default. -
generatePackage
- 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. -
writeCode
- Iffalse
, the plugin will not write the generated code to disk,true
by default. -
readOnly
- Iftrue
, the generated Java source files are set as read-only (XJC's-readOnly
option). Default isfalse
. -
packageLevelAnnotations
- Iffalse
, suppresses generation of package level annotations (package-info.java
). Default istrue
. Since0.9.0
. -
noFileHeader
- Iftrue
, suppresses generation of a file header with timestamp. Default isfalse
. Since0.9.0
. -
enableIntrospection
- Iftrue
, enables correct generation of Boolean getters/setters to enable Bean Introspection apis. Since0.9.0
. -
removeOldOutput
- Iftrue
, thegenerateDirectory
will be deleted before the XJC binding compiler recompiles the source files. Default isfalse
. -
cleanPackageDirectories
- Iftrue
(default), package directories will be cleaned before the XJC binding compiler generates the source files. -
markGenerated
- Iftrue
, marks generated classes using a@Generated
annotation - i.e. turns on XJC-mark-generated
option. Default isfalse
. -
encoding
- Encoding for the generated sources, defaults to${project.build.sourceEncoding
}. -
locale
- Locale used during generation, for instanceen
,de
,fr
etc. This will, for instance, influence the language of the generated JavaDoc comments.
By default, target directory (target/generated-sources/xjc
) will be added as a compile source root.
If your project also generates the episode file, it will be added as a project resource.
In some cases you may need to generate test
sources instead of main
sources.
So you'll need to add target directory as a test
compile source root.
Or you may need to override or avoid automatic source root addition for some other reason.
You can accomplish this using the following configuration options:
-
addCompileSourceRoot
- If set totrue
(default), adds target directory as a compile source root of this Maven project. -
addTestCompileSourceRoot
- If set totrue
, adds target directory as a test compile source root of this Maven project. Default value isfalse
.
- Home
- Migration guide
-
JAXB Maven Plugin
- Quick Start
-
User Guide
- Basic Usage
- Specifying What To Compile
- Referencing Resources in Maven Artifacts
- Using Catalogs
- Using Episodes
- Modular Schema Compilation
- Controlling the Output
- Using JAXB Plugins
- Using a Specific JAXB Version
- Configuring Extension, Validation and XML Security
- IDE Integration
- Miscellaneous
- Configuring Proxies
- Maven Documentation
- Configuration Cheat Sheet
- Common Pitfalls and Problems
-
JAXB2 Basics Plugins
- Using JAXB2 Basics Plugins
- JSR-305 Support
-
JAXB2 Basics Plugins List
- SimpleEquals Plugin
- SimpleHashCode Plugin
- Equals Plugin
- HashCode Plugin
- ToString Plugin
- Copyable Plugin
- Mergeable Plugin
- Inheritance Plugin
- AutoInheritance Plugin
- Wildcard Plugin
- Setters Plugin
- Simplify Plugin
- EnumValue Plugin
- JAXBIndex Plugin
- FixJAXB1058 Plugin
- Commons Lang Plugin
- Default Value Plugin
- Fluent API Plugin
- Namespace Prefix Plugin
- Value Constructor Plugin
- Boolean Getter Plugin
- CamelCase Plugin
- XML ElementWrapper Plugin
- Parent Pointer Plugin
- Property Listener Injector Plugin
- Annox
- JAXB Annotate Plugin
-
HyperJAXB3
- Build System Support
- Customization Guide
- Databases
- Development guide
- Extension guide
- FAQ
- IDE Support
- Java Persistence
- JAXB
- JDK Support
- Project Templates
-
Reference
- Adding vendor-specific annotations
- Features
- Integrating Hyperjaxb3 in builds
- Introduction
- Making schema-derived classes ready for JPA
- Adding required properties
- Applying workarounds for JAXB vs. JPA conflicts
- Enforcing top-level classes
- Generating equals and hashCode methods
- Generating ORM metadata
- Generating persistence unit descriptor
- JPA 2 Support
- Making classes serializable
- Testing generated mappings
- Reference - single page
- Related Projects
- Sample projects
- Solutions
- Target Scenarios
- Test Projects
- Tutorials
- Best Practices
- FAQ
- Sample Projects
- Support
- License
- Distribution