blob: 4d6594685df9d451e0ee0b0e929c5ec96d694b71 [file]
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<document xmlns="http://maven.apache.org/XDOC/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
<title>Java Configuration API</title>
<author email="pete@kazmier.com">Pete Kazmier</author>
<author email="mpoeschl@marmot.at">Martin Poeschl</author>
<author email="jason@zenplex.com">Jason van Zyl</author>
<author email="epugh@upstate.com">Eric Pugh</author>
<author email="tobrien@discursive.com">Tim O'Brien</author>
<author email="rgoers@apache.org">Ralph Goers</author>
</properties>
<body>
<section name="Introducing Apache Commons Configuration">
<p>
The Commons Configuration software library provides a generic configuration interface which enables
a Java application to read configuration data from a variety of sources. Commons Configuration
provides typed access to single, and multi-valued configuration parameters as demonstrated
by the following code:
<source><![CDATA[Double double = config.getDouble("number");
Integer integer = config.getInteger("number");]]></source>
</p>
<p>
Configuration parameters may be loaded from the following sources:
</p>
<ul>
<li>Properties files</li>
<li>XML documents</li>
<li>Windows INI files</li>
<li>Property list files (plist)</li>
<li>JNDI</li>
<li>JDBC Datasource</li>
<li>System properties</li>
<li>Applet parameters</li>
<li>Servlet parameters</li>
</ul>
<p>
Configuration objects are created using configuration builders.
Different configuration sources can be mixed using a <code>CombinedConfigurationBuilder</code> and
a <code>CombinedConfiguration</code>. Additional sources of configuration parameters can
be created by using custom configuration objects. This customization can be achieved by
extending <code>AbstractConfiguration</code> or <code>AbstractHierarchicalConfiguration</code>.
</p>
<p>
The full Javadoc API documentation is available <a href="apidocs/index.html">here</a>.
</p>
</section>
<section name="Commons Configuration 1.x and 2.x">
<p>
New projects should use 2.x, first released in 2016, under the Maven coordinates <code>org.apache.commons:commons-configuration2</code>.
</p>
<p>
The 1.x codebase no longer receives updates.
Denial of service issues that rely on loading untrusted data from configuration files,
or passing untrusted data to the API, are outside the scope of the 1.x security model
and will not be fixed. Upgrading your application from 1.x to 2.x will require at least changing import statement
code changes and possibly more, see the <a href="userguide/upgradeto2_0.html">migration guide for 2.0</a>.
</p>
<p>
The most recent Commons Configuration 2.x release can be downloaded from the
<a href="https://commons.apache.org/configuration/download_configuration.cgi">Apache download area</a>.
The artifacts have also been deployed to
<a href="https://repo1.maven.org/maven2/">Maven central</a>. Commons Configuration 1.x
artifacts are also available under their original Maven coordinates.
</p>
</section>
<section name="History">
<p>
Commons Configuration started as code in Apache JServ. The JServ code was subsequently
added to <a href="https://jakarta.apache.org/turbine">Jakarta Turbine</a>. After Jakarta
Turbine, this configuration interface moved to <a href="https://jakarta.apache.org/velocity">Jakarta Velocity</a>
and underwent various improvements. After Velocity, this code was introduced to the
<a href="https://commons.apache.org">Apache Commons</a> as <code>ExtendedProperties</code>.
Configuration began life in the Commons as a Sandbox component and was promoted to the
Commons Proper in late 2003.
</p>
</section>
</body>
</document>