OverviewCommons Configuration can be built using maven or ant. While building on a JDK 1.4 and higher should be no problem for JDK 1.3 (which is the minimum required JDK) some preparations are necessary. This is covered in full detail in the Building with JDK 1.3 section below. Maven GoalsMaven 1.x is our recommended build tool. To build the Configuration jar file, change into the directory where you unzipped the source distribution or where you checked out the sources from SVN and run "maven jar". The result will be in the (newly created) "target" subdirectory. To build the Javadocs, run "maven javadoc". The result will be in "target/docs/apidocs".
To build the full website, run "maven site". Note: For this
to work you will also have to checkout the
Ant GoalsTo build a jar file, change into Configuration's root directory and run "ant jar". The result will be in the "target" subdirectory. To build the Javadocs, run "ant javadoc". The result will be in "target/docs/apidocs". Building with JDK 1.3If you want to build Commons Configuration on a JDK 1.3, you will face two problems:
The first problem is that JDK 1.3 does not contain the JDBC 2.0
standard extensions, which are used by the
The second problem is related to a test class for
If these problems are solved, the build can be performed as described above. Setting custom build parameters
Both the maven and the ant build script support a file called
One use case for setting custom build properties would be to build
for a specific JDK version: If you build the jar on a JDK 1.5 for
instance, the classes won't be compatible with older JDK versions.
To enforce compatibility you can create a maven.compile.source = 1.3 maven.compile.target = 1.3 |