1 '\" t 2 .\" Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. 3 .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 .\" 5 .\" This code is free software; you can redistribute it and/or modify it 6 .\" under the terms of the GNU General Public License version 2 only, as 7 .\" published by the Free Software Foundation. 8 .\" 9 .\" This code is distributed in the hope that it will be useful, but WITHOUT 10 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 .\" version 2 for more details (a copy is included in the LICENSE file that 13 .\" accompanied this code). 14 .\" 15 .\" You should have received a copy of the GNU General Public License version 16 .\" 2 along with this work; if not, write to the Free Software Foundation, 17 .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 .\" 19 .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 .\" or visit www.oracle.com if you need additional information or have any 21 .\" questions. 22 .\" 23 .\" Arch: generic 24 .\" Software: JDK 8 25 .\" Date: 21 November 2013 26 .\" SectDesc: Java Web Services Tools 27 .\" Title: xjc.1 28 .\" 29 .if n .pl 99999 30 .TH xjc 1 "21 November 2013" "JDK 8" "Java Web Services Tools" 31 .\" ----------------------------------------------------------------- 32 .\" * Define some portability stuff 33 .\" ----------------------------------------------------------------- 34 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35 .\" http://bugs.debian.org/507673 36 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html 37 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 38 .ie \n(.g .ds Aq \(aq 39 .el .ds Aq ' 40 .\" ----------------------------------------------------------------- 41 .\" * set default formatting 42 .\" ----------------------------------------------------------------- 43 .\" disable hyphenation 44 .nh 45 .\" disable justification (adjust text to left margin only) 46 .ad l 47 .\" ----------------------------------------------------------------- 48 .\" * MAIN CONTENT STARTS HERE * 49 .\" ----------------------------------------------------------------- 50 51 .SH NAME 52 xjc \- Compiles an XML schema file into fully annotated Java classes\&. 53 .SH SYNOPSIS 54 .sp 55 .nf 56 57 \fBxjc\fR [ \fIoptions\fR ] \fBschema\fR \fIfile/URL/dir/jar\fR \&.\&.\&. [\fB\-b\fR \fIbindinfo\fR ] \&.\&.\&. 58 .fi 59 .sp 60 .TP 61 \fIoptions\fR 62 The command-line options\&. See Options\&. 63 .TP 64 schema \fIfile/URL/dir/jar \&.\&.\&.\fR 65 The location of the XML schema file\&. If \f3dir\fR is specified, then all schema files in it are compiled\&. If \f3jar\fR is specified, then the \f3/META-INF/sun-jaxb\&.episode\fR binding file is compiled\&. 66 .TP 67 -b \fIbindinfo\fR 68 .br 69 The location of the bindings files\&. 70 .SH DESCRIPTION 71 Start the binding compiler with the appropriate \f3xjc\fR shell script in the bin directory for your platform\&. There is also an Ant task to run the binding complier\&. See Using the XJC with Ant at http://jaxb\&.java\&.net/nonav/2\&.1\&.3/docs/xjcTask\&.html 72 .SH OPTIONS 73 .TP 0.2i 74 \(bu 75 See also Nonstandard Options 76 .TP 0.2i 77 \(bu 78 See also Deprecated and Removed Options 79 .TP 80 -nv 81 .br 82 By default, the XJC binding compiler performs strict validation of the source schema before processing it\&. Use this option to disable strict schema validation\&. This does not mean that the binding compiler will not perform any validation, but means that it will perform a less-strict validation\&. 83 .TP 84 -extension 85 .br 86 By default, the XJC binding compiler strictly enforces the rules outlined in the Compatibility chapter of the JAXB Specification\&. Appendix E\&.2 defines a set of W3C XML Schema features that are not completely supported by JAXB v1\&.0\&. In some cases, you may be allowed to use them in the \f3-extension\fR mode enabled by this switch\&. In the default (strict) mode, you are also limited to using only the binding customization defined in the specification\&. By using the \f3-extension\fR switch, you will be allowed to use the JAXB Vendor Extensions\&. 87 .TP 88 -b \fIfile\fR 89 .br 90 Specifies one or more external binding files to process\&. Each binding file must have its own \f3-b\fR switch\&. The syntax of the external binding files is flexible\&. You can have a single binding file that contains customization for multiple schemas or you can break the customization into multiple bindings files: \f3xjc schema1\&.xsd schema2\&.xsd schema3\&.xsd -b bindings123\&.xjb\fR\f3xjc schema1\&.xsd schema2\&.xsd schema3\&.xsd -b bindings1\&.xjb -b bindings2\&.xjb -b bindings3\&.xjb\fR\&. In addition, the ordering of the schema files and binding files on the command line does not matter\&. 91 .TP 92 -d \fIdir\fR 93 .br 94 By default, the XJC binding compiler generates the Java content classes in the current directory\&. 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\&. 95 .TP 96 -p \fIpkg\fR 97 .br 98 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\&. 99 .TP 100 -httpproxy \fIproxy\fR 101 .br 102 Specifies the HTTP or HTTPS proxy in the format \fI[user[:password]@]proxyHost[:proxyPort]\fR\&. The old \f3-host\fR and \f3-port\fR 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 \f3-httpproxyfile\fR option\&. 103 .TP 104 -httpproxyfile file 105 .br 106 Specifies the HTTP or HTTPS proxy with a file\&. The same format as the \f3-httpproxy\fR option, but the password specified in the file is not visible to other users\&. 107 .TP 108 -classpath arg 109 .br 110 Specifies where to find client application class files used by the \fIjxb:javaType\fR and xjc:\fIsuperClass\fR customization\&. 111 .TP 112 -catalog file 113 .br 114 Specifies catalog files to resolve external entity references\&. Supports the TR9401, XCatalog, and OASIS XML Catalog formats\&. See XML Entity and URI Resolvers at http://xerces\&.apache\&.org/xml-commons/components/resolver/resolver-article\&.html 115 .TP 116 -readOnly 117 .br 118 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\&. 119 .TP 120 -npa 121 .br 122 Suppresses the generation of package level annotations into \f3**/package-info\&.java\fR\&. Using this switch causes the generated code to internalize those annotations into the other generated classes\&. 123 .TP 124 -no-header 125 .br 126 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 \f3diff\fR command\&. 127 .TP 128 -target 2\&.0 129 .br 130 Avoids generating code that relies on any JAXB 2\&.1 features\&. This will allow the generated code to run with JAXB 2\&.0 runtime environment (such as Java SE 6)\&. 131 .TP 132 -xmlschema 133 .br 134 Treats input schemas as W3C XML Schema (default)\&. If you do not specify this switch, then your input schemas are treated as though they are W3C XML Schemas\&. 135 .TP 136 -relaxing 137 .br 138 Treats input schemas as RELAX NG (experimental and unsupported)\&. Support for RELAX NG schemas is provided as a JAXB Vendor Extension\&. 139 .TP 140 -relaxing-compact 141 .br 142 Treat input schemas as RELAX NG compact syntax (experimental and unsupported)\&. Support for RELAX NG schemas is provided as a JAXB Vendor Extension\&. 143 .TP 144 -dtd 145 .br 146 Treats input schemas as XML DTD (experimental and unsupported)\&. Support for RELAX NG schemas is provided as a JAXB Vendor Extension\&. 147 .TP 148 -wsdl 149 .br 150 Treats input as WSDL and compiles schemas inside it (experimental and unsupported)\&. 151 .TP 152 -quiet 153 .br 154 Suppress compiler output, such as progress information and warnings\&. 155 .TP 156 -verbose 157 .br 158 Be extra verbose, such as printing informational messages or displaying stack traces upon some errors\&. 159 .TP 160 -help 161 .br 162 Displays a brief summary of the compiler switches\&. 163 .TP 164 -version 165 .br 166 Displays the compiler version information\&. 167 .TP 168 \fIschema file/URL/dir\fR 169 Specifies one or more schema files to compile\&. If you specify a directory, then the \f3xjc\fR command scans it for all schema files and compiles them\&. 170 .SS NONSTANDARD\ OPTIONS 171 .TP 172 -XLocator 173 .br 174 Causes the generated code to expose SAX Locator information about the source XML in the Java bean instances after unmarshalling\&. 175 .TP 176 -Xsync-methods 177 .br 178 Causes all of the generated method signatures to include the \f3synchronized\fR keyword\&. 179 .TP 180 -mark-generated 181 .br 182 Marks the generated code with the annotation \f3@javax\&.annotation\&.Generated\fR\&. 183 .TP 184 -episode file 185 .br 186 Generates the specified episode file for separate compilation\&. 187 .SS DEPRECATED\ AND\ REMOVED\ OPTIONS 188 .TP 189 -host & -port 190 .br 191 These options are replaced with the \f3-httpproxy\fR option\&. For backward compatibility, these options are supported, but will not be documented and might be removed from future releases\&. 192 .TP 193 -use-runtime 194 .br 195 Because the JAXB 2\&.0 specification has defined a portable runtime environment, it is no longer necessary for the JAXB RI to generate \f3**/impl/runtime\fRpackages\&. Therefore, this switch is obsolete and was removed\&. 196 .TP 197 -source 198 .br 199 The \f3-source\fR compatibility switch was introduced in the first JAXB 2\&.0 Early Access release\&. This switch is removed from future releases of JAXB 2\&.0\&. If you need to generate 1\&.0\&.x code, then use an installation of the 1\&.0\&.x code base\&. 200 .SH COMPILER\ RESTRICTIONS 201 In general, it is safest to compile all related schemas as a single unit with the same binding compiler switches\&. Keep the following list of restrictions in mind when running the \f3xjc\fR command\&. Most of these issues only apply when you compile multiple schemas with multiple invocations of the \f3xjc\fR command\&. 202 .PP 203 To compile multiple schemas at the same time, keep the following precedence rules for the target Java package name in mind: 204 .TP 0.4i 205 1\&. 206 The \f3-p\fR option has the highest precedence\&. 207 .TP 0.4i 208 2\&. 209 \fIjaxb:package\fR customization\&. 210 .TP 0.4i 211 3\&. 212 If \f3targetNamespace\fR is declared, then apply the \f3t\fR\f3argetNamespace\fR to the Java package name algorithm defined in the specification\&. 213 .TP 0.4i 214 4\&. 215 If no \f3targetNamespace\fR is declared, then use a hard coded package named \f3generated\fR\&. 216 .PP 217 You cannot have more than one \fIjaxb:schemaBindings\fR per name space, so it is impossible to have two schemas in the same target name space compiled into different Java packages\&. 218 .PP 219 All schemas being compiled into the same Java package must be submitted to the XJC binding compiler at the same time\&. They cannot be compiled independently and work as expected\&. 220 .PP 221 Element substitution groups that are spread across multiple schema files must be compiled at the same time\&. 222 .SH SEE\ ALSO 223 .TP 0.2i 224 \(bu 225 Binding Compiler (xjc) at http://jaxb\&.java\&.net/nonav/2\&.2\&.3u1/docs/xjc\&.html 226 .TP 0.2i 227 \(bu 228 Java Architecture for XML Binding (JAXB) at http://www\&.oracle\&.com/technetwork/articles/javase/index-140168\&.html 229 .RE 230 .br 231 'pl 8.5i 232 'bp