Runtime dependencies

In the maven POM a lot of dependencies are declared. These are all needed during compile time. On runtime however you only need to add the dependencies to your classpath that are required by the parts of the Commons Configuration package you are using. The following table helps you to determine which dependencies you have to include based on the components you intend to use:

ComponentDependencies
Core Java 1.3

commons-collections

commons-lang

commons-logging
ConfigurationFactory commons-digester

commons-beanutils

Java 1.4 or xml-apis
DefaultConfigurationBuilder commons-beanutils

Java 1.4 or (xml-apis + xerces + xalan)
DatabaseConfigurationJDBC 3.0 (Java 1.4 or jdbc2_0-stdext.jar)
XMLConfigurationJava 1.4 or (xml-apis + xerces + xalan)
XMLPropertiesConfigurationJava 1.4 or (xml-apis + xerces)
PropertyListConfigurationcommons-codec
XMLPropertyListConfiguration commons-codec

Java 1.4 or xml-apis
ConfigurationDynaBeancommons-beanutils
XPathExpressionEnginecommons-jxpath
EnvironmentConfigurationJava 1.5 or ant 1.6.5

Notes

  • Commons Configuration makes use of other Commons components. You should be able to use the current versions of these components together with Commons Configuration. In some cases, when no specific features are used, older versions will work, too. Below is a table with the version numbers that have been tested:
    ComponentVersion
    commons-lang2.2, 2.3
    commons-collections3.1, 3.2
    commons-logging1.0.4, 1.1
    commons-digester1.6, 1.7, 1.8
    commons-beanutils1.7.0
    commons-codec1.3
    commons-jxpath1.2
  • In Java versions before 1.4 XML support is not integrated. To make use of components that require XML processing you need to add a suitable replacement. We used Xerces 2.2.1, Xalan 2.7.0, and XML APIs 2.0.2. Version 2.7.0 of Xalan seems to cause some problems in a few of our JUnit tests (a java.lang.NoSuchMethodError is thrown when a SAX data source is to be transformed into a DOM result). With version 2.6.0 these problems do not occur. In both cases the error happened only in test code; the actual code was not affected. But if you face a similar problem with Xalan 2.7.0 it is worth trying the older version.