-
Notifications
You must be signed in to change notification settings - Fork 38
Command Line Usage
Alexey Valikov edited this page Apr 27, 2015
·
1 revision
Jsonix Schema Compiler command-line tool is based on the XJC, JAXB Schema Compiler.
java -jar jsonix-schema-compiler-full.jar
[-options ...]
<schema file/URL/dir/jar> ...
[-b <bindinfo>] ...
If dir
is specified, all schema files in this directory will be compiled.
-
-nv
- do not perform strict validation of the input schema(s). -
-b <file/dir>
- specify external bindings files (each<file>
must have its own-b
). If a directory is given,**/*.xjb
is searched. -
-d <dir>
- generated files will go into this directory. If this directory does not exist, it will be created. -
-p <pkg>
- specifies the target package. -
-httpproxy <proxy>
- set HTTP/HTTPS proxy. Format is[user[:password]@]proxyHost:proxyPort
. -
-httpproxyfile <f>
- works like-httpproxy
but takes the argument in a file to protect password. -
-catalog <file>
- specify catalog files to resolve external entity references. Supports TR9401, XCatalog, and OASIS XML Catalog format.
-
-defaultNaming
(alias-Xjsonix-defaultNaming
) - default naming strategy. Possible values are:-
STANDARD
- standard naming (default). -
COMPACT
- compact naming.
-
-
-compact
(alias-Xjsonix-compact
) - generate compact naming by default. This is the same as-defaultNaming COMPACT
, left for backwards compatibility. -
-generateJsonSchema
(alias-Xjsonix-generateJsonSchema
) - turns on JSON Schema generation. -
-logLevel
(alias-Xjsonix-logLevel
) - sets the logging level. Possible values are:TRACE
DEBUG
-
INFO
- default WARN
ERROR
java -jar jsonix-schema-compiler-full.jar -p PO purchaseorder.xsd
Compiles the purchaseorder.xsd
, generates files in the current directory but uses PO
as package name. This will produce a PO
mapping module in the file PO.js
in the current directory.
java -jar jsonix-schema-compiler-full.jar
-compact -logLevel TRACE
-d mappings
purchaseorder.xsd
-b bindings.xjb
Compiles the purchaseorder.xsd
schema using the bindings.xjb
file and writes the generated files to the mappings
directory. Generated mappings will use the compact naming (-compact
), schema compiler will use the TRACE
log level when compiling (you'll get a very verbose output).
- Usage
- Basic Concepts
- Generation
- Configuration
- Advanced Topics
- Sample Projects
- Troubleshooting
- Development