To build JiBX, either from the distribution or from a CVS image, use the Ant build.xml file in the /build directory. JiBX is compatible with 1.3 and 1.4 JDKs, but must be built using 1.5 or later. The default Ant target compiles the full JiBX code with debug information enabled, runs the full set of tests, and creates the actual distribution zip file. Since this default build includes a variety of unit tests, you must have JUnit available for use from Ant in order to use the default build (which can be done by adding a recent junit.jar to your Ant lib directory, or by adding it to the CLASSPATH environmental variable). The "current" target just rebuilds the jars (in the /lib directory) without running the tests, so you can use this target even if JUnit is not installed. The "small-jars" target does the same as "current", but builds the jars with debug information turned off (useful if the jar sizes are a concern for your project).
Note that the JiBX source code repository may contain classes which are not actually used in the current JiBX distribution, and these classes may not even compile properly. The Ant build specifies which classes to include and exclude when compiling the project. If you use an IDE or other tool to build JiBX, you will need to exclude the unused source files from your project. Most modern IDEs will allow you to create a project based on an Ant build, and this is generally the best way to start out.
The Ant build looks for dom4j.jar and jdom.jar files in the /lib directory. If these jar file are present the build will include the classes in the jibx-extras.jar that support working with these document models. If the jars are not found these classes will be missing from the generated jibx-extras.jar. Additionally, building the JavaDocs without these jars will result in some error messages. These error messages can be ignored.
The build has been tested on JDK versions 1.3 through 1.6. JDK 1.3 does not include the JAXP library (used by the JiBX extras code for DOM document model support) in the distribution, so to build with JDK 1.3 you need a JAXP implementation. As a convenience, the supplied build file will look for Xerces jar files in the /lib directory and include these in the classpath if the jars are present. The jar files needed for this purpose are xercesImpl.jar and xml-apis.jar.
To build the internal JavaDocs, use the Ant "devdoc" target. This will generate the full JavaDocs for all JiBX code (rather than just the user-visible classes included in the normal JavaDocs) to the /build/docs/dev directory.
If you're building JiBX within an IDE environment, you can use the Ant
build-binding.xml file in the /build directory to compile the
JiBX bindings used by the binding compiler itself. You'll need to recompile
these bindings any time classes in the