Generating Liberty configurations schema from the command line
Use the ws-schemagen.jar tool that is in the wlp/bin/tools directory to generate the schema for Liberty core and other installed products extensions in a single output file.
In version 22.0.0.5 and later, the schemaGen command is available to generate the schema for a Liberty installation in a single output file. For more information, see the schemaGen command on the Open Liberty website.
Syntax
The command syntax is as follows:
java [JVM options]
-jar ws-schemagen.jar [options] outputFile
Options
The following options are available:
- --encoding=charset
- Where charset is the character set to use when you are creating the output file.
- --locale=language
- Where language specifies the language to use when you are creating the output file. This string consists of the ISO-639 two-letter lowercase language code, optionally followed by and underscores and the ISO-3166 uppercase two-letter country code.
- --schemaVersion=1.1
- If this option is specified, then both explicitly named child elements and the
xsd:any
element are written to the output file. - --outputVersion=2
- If this option is specified, only the
xsd:any
element is used in the output file, so that unknown elements pass XSD validation at the expense of losing validation for known elements.
Usage examples
The following example generates the installed products' schema and stores in a file called
schema.xsd:
java -jar ws-schemagen.jar schema.xsd
The following example generates the installed products' schema and stores in a file that is
called schema.xsd using the Brazilian Portuguese
language:
java -jar ws-schemagen.jar schema.xsd --locale=pt_BR
The following example displays help
information:
java -jar ws-schemagen.jar --help