|
|
992a52d |
# Some of the test dependencies are not available in Fedora
|
|
|
992a52d |
%bcond_with test
|
|
|
96c0e60 |
|
|
|
992a52d |
Name: apache-commons-configuration
|
|
|
a39962a |
Version: 2.10.1
|
|
|
992a52d |
Release: %autorelease
|
|
|
992a52d |
Summary: Read configuration data from a variety of sources
|
|
|
96c0e60 |
|
|
|
992a52d |
License: Apache-2.0
|
|
|
96c0e60 |
BuildArch: noarch
|
|
|
992a52d |
ExclusiveArch: %{java_arches} noarch
|
|
|
992a52d |
URL: https://commons.apache.org/proper/commons-configuration/
|
|
|
a39962a |
VCS: https://github.com/apache/commons-configuration
|
|
|
992a52d |
Source0: https://archive.apache.org/dist/commons/configuration/source/commons-configuration2-%{version}-src.tar.gz
|
|
|
992a52d |
Source1: https://archive.apache.org/dist/commons/configuration/source/commons-configuration2-%{version}-src.tar.gz.asc
|
|
|
992a52d |
Source2: https://downloads.apache.org/commons/KEYS
|
|
|
96c0e60 |
|
|
|
992a52d |
# Adapt to JEXL 3
|
|
|
992a52d |
Patch0: %{name}-jexl3.patch
|
|
|
992a52d |
|
|
|
992a52d |
BuildRequires: gnupg2
|
|
|
96c0e60 |
BuildRequires: maven-local
|
|
|
96c0e60 |
BuildRequires: mvn(commons-logging:commons-logging)
|
|
|
96c0e60 |
BuildRequires: mvn(javax.servlet:servlet-api)
|
|
|
992a52d |
BuildRequires: mvn(org.apache.commons:commons-lang3)
|
|
|
96c0e60 |
BuildRequires: mvn(org.apache.commons:commons-parent:pom:)
|
|
|
992a52d |
BuildRequires: mvn(org.apache.commons:commons-text)
|
|
|
992a52d |
BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin)
|
|
|
992a52d |
BuildRequires: mvn(org.apache.maven.plugins:maven-jar-plugin)
|
|
|
992a52d |
BuildRequires: mvn(org.apache.maven.plugins:maven-surefire-plugin)
|
|
|
96c0e60 |
BuildRequires: mvn(org.codehaus.mojo:javacc-maven-plugin)
|
|
|
96c0e60 |
|
|
|
992a52d |
# Optional dependencies
|
|
|
992a52d |
BuildRequires: mvn(com.fasterxml.jackson.core:jackson-databind)
|
|
|
992a52d |
BuildRequires: mvn(commons-beanutils:commons-beanutils)
|
|
|
992a52d |
BuildRequires: mvn(commons-codec:commons-codec)
|
|
|
992a52d |
BuildRequires: mvn(commons-jxpath:commons-jxpath)
|
|
|
992a52d |
BuildRequires: mvn(org.apache.commons:commons-jexl3)
|
|
|
992a52d |
BuildRequires: mvn(org.apache.commons:commons-vfs2)
|
|
|
992a52d |
BuildRequires: mvn(org.apache.logging.log4j:log4j-core)
|
|
|
992a52d |
BuildRequires: mvn(org.yaml:snakeyaml)
|
|
|
992a52d |
BuildRequires: mvn(xml-resolver:xml-resolver)
|
|
|
96c0e60 |
|
|
|
992a52d |
# Optional dependencies not available in Fedora
|
|
|
992a52d |
#BuildRequires: mvn(org.springframework:spring-beans)
|
|
|
992a52d |
#BuildRequires: mvn(org.springframework:spring-core)
|
|
|
992a52d |
|
|
|
992a52d |
# Test dependencies
|
|
|
992a52d |
%if %{with test}
|
|
|
992a52d |
BuildRequires: mvn(com.sun.mail:mailapi)
|
|
|
992a52d |
BuildRequires: mvn(commons-io:commons-io)
|
|
|
992a52d |
BuildRequires: mvn(org.apache.commons:commons-dbcp2)
|
|
|
992a52d |
BuildRequires: mvn(org.apache.commons:commons-pool2)
|
|
|
992a52d |
BuildRequires: mvn(org.dbunit:dbunit)
|
|
|
992a52d |
BuildRequires: mvn(org.hamcrest:hamcrest)
|
|
|
992a52d |
BuildRequires: mvn(org.hsqldb:hsqldb)
|
|
|
992a52d |
BuildRequires: mvn(org.junit.jupiter:junit-jupiter)
|
|
|
992a52d |
BuildRequires: mvn(org.mockito:mockito-core)
|
|
|
992a52d |
BuildRequires: mvn(org.slf4j:slf4j-api)
|
|
|
992a52d |
BuildRequires: mvn(org.slf4j:slf4j-ext)
|
|
|
992a52d |
BuildRequires: mvn(org.slf4j:slf4j-log4j12)
|
|
|
992a52d |
BuildRequires: mvn(org.slf4j:slf4j-nop)
|
|
|
992a52d |
BuildRequires: mvn(org.springframework:spring-context)
|
|
|
992a52d |
BuildRequires: mvn(org.springframework:spring-test)
|
|
|
96c0e60 |
%endif
|
|
|
96c0e60 |
|
|
|
992a52d |
%description
|
|
|
992a52d |
The Commons Configuration software library provides a generic
|
|
|
992a52d |
configuration interface which enables a Java application to read
|
|
|
992a52d |
configuration data from a variety of sources. Commons Configuration
|
|
|
992a52d |
provides typed access to single, and multi-valued configuration
|
|
|
992a52d |
parameters as demonstrated by the following code:
|
|
|
992a52d |
|
|
|
992a52d |
Double double = config.getDouble("number");
|
|
|
992a52d |
Integer integer = config.getInteger("number");
|
|
|
992a52d |
|
|
|
992a52d |
Configuration parameters may be loaded from the following sources:
|
|
|
992a52d |
- Properties files
|
|
|
992a52d |
- XML documents
|
|
|
992a52d |
- Windows INI files
|
|
|
992a52d |
- Property list files (plist)
|
|
|
992a52d |
- JNDI
|
|
|
992a52d |
- JDBC Datasource
|
|
|
992a52d |
- System properties
|
|
|
992a52d |
- Applet parameters
|
|
|
992a52d |
- Servlet parameters
|
|
|
992a52d |
|
|
|
992a52d |
Configuration objects are created using configuration builders.
|
|
|
992a52d |
Different configuration sources can be mixed using a
|
|
|
992a52d |
CombinedConfigurationBuilder and a CombinedConfiguration. Additional
|
|
|
992a52d |
sources of configuration parameters can be created by using custom
|
|
|
992a52d |
configuration objects. This customization can be achieved by extending
|
|
|
992a52d |
AbstractConfiguration or AbstractHierarchicalConfiguration.
|
|
|
992a52d |
|
|
|
992a52d |
%javadoc_package
|
|
|
96c0e60 |
|
|
|
96c0e60 |
%prep
|
|
|
992a52d |
%{gpgverify} --data=%{SOURCE0} --signature=%{SOURCE1} --keyring=%{SOURCE2}
|
|
|
992a52d |
%autosetup -n commons-configuration2-%{version}-src -p1
|
|
|
992a52d |
|
|
|
992a52d |
# Not needed for RPM builds
|
|
|
992a52d |
%pom_xpath_remove //pom:reporting
|
|
|
992a52d |
%pom_remove_plugin :apache-rat-plugin
|
|
|
992a52d |
%pom_remove_plugin :maven-checkstyle-plugin
|
|
|
992a52d |
%pom_remove_plugin :maven-javadoc-plugin
|
|
|
992a52d |
%pom_remove_plugin :maven-pmd-plugin
|
|
|
992a52d |
%pom_remove_plugin :maven-scm-publish-plugin
|
|
|
992a52d |
%pom_remove_plugin :spotbugs-maven-plugin
|
|
|
992a52d |
|
|
|
992a52d |
# The Spring framework is not available in Fedora
|
|
|
992a52d |
%pom_remove_dep org.springframework:spring-core
|
|
|
992a52d |
%pom_remove_dep org.springframework:spring-beans
|
|
|
992a52d |
%pom_remove_dep org.springframework:spring-context
|
|
|
992a52d |
%pom_remove_dep org.springframework:spring-test
|
|
|
992a52d |
rm -fr src/{main,test}/java/org/apache/commons/configuration2/spring
|
|
|
96c0e60 |
|
|
|
96c0e60 |
%build
|
|
|
96c0e60 |
# We skip tests because we don't have test deps (dbunit in particular).
|
|
|
992a52d |
%if %{with test}
|
|
|
a39962a |
%mvn_build -- -Dcommons.packageId=configuration
|
|
|
992a52d |
%else
|
|
|
a39962a |
%mvn_build -f -- -Dcommons.packageId=configuration
|
|
|
992a52d |
%endif
|
|
|
96c0e60 |
|
|
|
96c0e60 |
%install
|
|
|
96c0e60 |
%mvn_install
|
|
|
96c0e60 |
|
|
|
96c0e60 |
%files -f .mfiles
|
|
|
992a52d |
%doc README.md RELEASE-NOTES.txt
|
|
|
992a52d |
%license LICENSE.txt NOTICE.txt
|
|
|
96c0e60 |
|
|
|
96c0e60 |
%changelog
|
|
|
992a52d |
%autochangelog
|