You need to use Commons Configuration to access configuration stored in properties files and XML documents.
To use Commons Configuration 1.6 in a Maven 2 project, add the
following dependency to your project's
pom.xml
:
Example 7.3. Adding a Dependency on Commons Configuration
<dependency> <groupId>commons-configuration</groupId> <artifactId>commons-configuration</artifactId> <version>1.6</version> </dependency>
If you are not sure what this means, I'd suggest reading Maven: The Definitive
Guide. When you depend on a library in Maven 2, all you need to
do is add the dependency groupId
,
artifactId
, and version
to your
project's dependencies. Once you do this, Maven 2 will download the
dependency and make it available on your project's classpath.
Commons Configuration is designed to provide access to application configuration in the form of properties files,
XML documents, JNDI resources, or data from a JDBC Datasource
. Commons Configuration also allows
you to create a hierarchical or multileveled configuration allowing for
default settings to be selectively overridden by local configuration.
Commons Configuration also provides typed access to single- and
multivalued configuration parameters.
For more information about the Commons Configuration project, see the Commons Configuration project page at http://commons.apache.org/configuration.