This is true also if you implement custom Filters. Only files or directories that actually exist will be included in the case of files or recursively searched for XJB files to include in the case of directories. JAXB binding files are used to configure parts of the Java source generation. Supply the configuration using the standard Maven structure for configuring plugin Lists:. Parameter holding a List of Filters, used to match all files under the sources directories which should not be considered XJC source files.
The filters identify files to exclude, and hence this parameter is called xjcSourceExcludeFilters. If a file under any of the source directories matches at least one of the Filters supplied in the xjcSourceExcludeFilters, it is not considered an XJC source file, and therefore excluded from processing.
The algorithm for finding XJC sources is as follows:. Example: The following configuration would exclude any sources whose names end with txt or foo:. The target directory is created within the artifact if it does not already exist.
If the xsdPathWithinArtifact parameter is not given, the XSDs used to generate Java code are not included within the project's artifact. Note : This parameter was previously called includeSchemasOutputPath in the 1. List of ordered extra arguments to the XJC command. Each extra argument is interpreted as a word, intended to be copied verbatim to the XJC argument list with spaces in between:.
The arguments configured above yields the following extra arguments to the XJC command: -Xfluent-api -episode somefile. From plugin version 2. Instead, episode files are generated by default with all JAXB operations. Starting with plugin version 2. Last Published: Version: 3. Corresponding XJC parameter: mark-generated.
This feature causes all of the generated code to have Generated annotation. This should be removed in the 2. Corresponding XJC parameter: catalog. Corresponding XJC parameter: enableIntrospection. The algorithm for finding the encoding to use is as follows where the first non-null value found is used for encoding : If the configuration property is explicitly given within the plugin's configuration, use that value.
If the Maven property project. Otherwise use the value from the system property file. Corresponding XJC parameter: episode. Corresponding XJC parameter: extension. Same format as above, but the password specified in the file is not visible to other users. Use this option to force the XJC binding compiler to mark the generated Java sources read-only. Using this switch causes the generated code to internalize those annotations into the other generated classes.
For backwards compatibility, we will continue to support these options, but they will no longer be documented and may be removed from future releases. Therefore, this switch is obsolete and has been removed. We have decided to remove this switch from future releases of JAXB 2. If you need to generate 1. We plan on releasing this functionality as a separate download in the future. Compiler Restrictions In general, it is safest to compile all related schemas as a single unit with the same binding compiler switches.
Use this option to specify an alternate output directory. The output directory must already exist. The XJC binding compiler does not create it for you. When you specify a target package with this command-line option, it overrides any binding customization for the package name and the default package name algorithm defined in the specification.
The old -host and -port options are still supported by the RI for backward compatibility, but they were deprecated. The password specified with this option is an argument that is visible to other users who use the top command.
For greater security, use the -httpproxyfile option. The same format as the -httpproxy option, but the password specified in the file is not visible to other users. Specifies where to find client application class files used by the jxb:javaType and xjc: superClass customization. Specifies catalog files to resolve external entity references. By default, the XJC binding compiler does not write-protect the Java source files it generates.
Use this option to force the XJC binding compiler to mark the generated Java sources as read-only. Using this switch causes the generated code to internalize those annotations into the other generated classes. Suppresses the generation of a file header comment that includes some note and time stamp. Using this makes the generated code more compatible with the diff command. Avoids generating code that relies on any JAXB 2.
This will allow the generated code to run with JAXB 2. Be extra verbose, such as printing informational messages or displaying stack traces upon some errors. Specifies one or more schema files to compile. If you specify a directory, then the xjc command scans it for all schema files and compiles them.
0コメント