JiBX Schema Library Project is collection of pre-built JiBX java schema bindings.
Contributing to the Schema Library is easy. We have several great tools. You can also hire a schema analyst to do it for you. The JiBX team are experts in JiBX and schema analysis.
There are several great tools available for building your schema library.
The JiBX project building tool can be run several ways:
Whichever tools you use, the parameters are the same.
For a single schema:
Parameter | Description |
---|---|
schemaLocation | The URL of the schema. |
parentProjectDirectory | The parent project name (Optional). If you want this project added as a sub-project. |
description | The schema description. Try to format your description as follows: 'Schema Library - (site url) - (Schema description)'. |
developerName | Your name. |
developerEmail | Your email. |
For multiple schema from a schema catalog:
Parameter | Description |
---|---|
catalogLocation | The url of the open-oasis schema catalog. |
projectName | The name of the schema collection (typically the main project url). |
projectDescription | The description of the schema collection. |
organizationName | The organization name. |
organizationURL | The organization URL. |
targetDomain | This filter will only include the catalog schema residing at this domain (optional). |
developerName | Your name. |
developerEmail | Your email. |
First, download the 'create-jibx-project' utility jar file.
If you don't supply any parameters, the gui tool will start up automatically. Enter the on-screen parameters and press the build button. Just double-click the downloaded jar file or type:
java -jar create-jibx-project-1.1.4.jar
The easiest way is setup a new project is to supply the location of a schema.
java -jar create-jibx-project-1.1.4.jar schemaLocation=http://maven.apache.org/maven-v4_0_0.xsd
Give this example a try. After you run this program change your directory to the newly
created maven project directory and build the project:
cd org.jibx.schema.org.apache.maven.maven_v4_0_0 mvn install
If you want to submit your project to the JiBX schema library, you will need to supply a few more pieces of information:
java -jar create-jibx-project-1.1.4.jar \ schemaLocation=http://maven.apache.org/maven-v4_0_0.xsd \ description="Schema Library - maven.apache.org - Maven POM version 4.0 schema" \ developerName="Don Corley" \ developerEmail="don@tourgeek.com"
If you have a oasis-open formatted catalog listing several schema, this tool will create a main project with a sub-project for each schema:
java -jar create-jibx-project-1.1.4.jar \ catalogLocation=http://schemas.stylusstudio.com/maven/catalogs/catalog.xml \ targetDomain=maven.apache.org \ projectName="maven.apache.org" \ projectDescription="Maven POM schema bindings." \ organizationName="Apache Maven" \ organizationURL="http://maven.apache.org" \ developerName="Don Corley" \ developerEmail="don@tourgeek.com"
If you want to add more schema to a currently existing main project, add the parentProjectDirectory parameter:
java -jar create-jibx-project-1.1.4.jar \ schemaLocation=http://maven.apache.org/maven-v4_0_0.xsd \ parentProjectDirectory=org.apache.maven \ description="Schema Library - maven.apache.org - Maven POM version 4.0 schema" \ developerName="Don Corley" \ developerEmail="don@tourgeek.com"
To run the JiBX project building tool as a maven plugin, use the same parameters as the standalone example. For single schema bindings, use the 'generate' goal. Remember to add '-D' to the start of your parameters.
mvn org.jibx.schema.config:schema-maven-plugin:1.1.4:generate -DschemaLocation=http://maven.apache.org/maven-v4_0_0.xsd
For multiple schema bindings, use the 'scan-catalog' goal.
mvn org.jibx.schema.config:schema-maven-plugin:1.1.4:scan-catalog \ -DcatalogLocation=http://schemas.stylusstudio.com/maven/catalogs/catalog.xml \ -DtargetDomain=maven.apache.org \ -DprojectName="maven.apache.org" \ -DprojectDescription="Maven POM schema bindings." \ -DorganizationName="Apache Maven" \ -DorganizationURL="http://maven.apache.org" \ -DdeveloperName="Don Corley" \ -DdeveloperEmail="don@tourgeek.com"