66cd316
66cd316
%global base_name       configuration
66cd316
%global short_name      commons-%{base_name}
66cd316
66cd316
Name:           apache-%{short_name}
66cd316
Version:        1.6
Stanislav Ochotnicky e173b25
Release:        5%{?dist}
66cd316
Summary:        Commons Configuration Package
66cd316
66cd316
Group:          Development/Libraries
66cd316
License:        ASL 2.0
66cd316
URL:            http://commons.apache.org/%{base_name}/
66cd316
Source0:        http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
Stanislav Ochotnicky e173b25
Patch0:         0001-Change-ant-groupId-to-org.apache.ant.patch
Stanislav Ochotnicky e173b25
Patch1:         0002-Remove-test-deps.patch
66cd316
BuildArch:      noarch
66cd316
66cd316
BuildRequires:  java-devel
66cd316
BuildRequires:  jpackage-utils >= 0:1.7.2
66cd316
BuildRequires:  maven-doxia-sitetools
66cd316
BuildRequires:  maven-plugin-bundle
66cd316
BuildRequires:  maven-surefire-maven-plugin
66cd316
BuildRequires:  maven-surefire-provider-junit
66cd316
BuildRequires:  maven2-plugin-antrun
66cd316
BuildRequires:  maven2-plugin-assembly
66cd316
BuildRequires:  maven2-plugin-compiler
66cd316
BuildRequires:  maven2-plugin-idea
66cd316
BuildRequires:  maven2-plugin-install
66cd316
BuildRequires:  maven2-plugin-jar
66cd316
BuildRequires:  maven2-plugin-javadoc
66cd316
BuildRequires:  maven2-plugin-resources
Stanislav Ochotnicky e173b25
BuildRequires:  maven
66cd316
66cd316
BuildRequires:  xalan-j2
66cd316
BuildRequires:  xerces-j2
66cd316
BuildRequires:  xml-commons-apis
66cd316
BuildRequires:  apache-commons-beanutils >= 0:1.7.0
66cd316
BuildRequires:  apache-commons-codec
66cd316
BuildRequires:  apache-commons-lang
66cd316
BuildRequires:  apache-commons-logging
66cd316
# convert to apache-commons when transition is done
Stanislav Ochotnicky 7c98f70
BuildRequires:  apache-commons-collections
66cd316
BuildRequires:  jakarta-commons-dbcp
Stanislav Ochotnicky 7c98f70
BuildRequires:  apache-commons-digester
Stanislav Ochotnicky 7c98f70
BuildRequires:  apache-commons-jxpath
66cd316
BuildRequires:  jakarta-commons-pool
Stanislav Ochotnicky 7c98f70
BuildRequires:  servlet25
Stanislav Ochotnicky 7c98f70
BuildRequires:  tomcat6
66cd316
Stanislav Ochotnicky 7c98f70
Requires:  servlet25
66cd316
Requires:  apache-commons-beanutils >= 0:1.7.0
66cd316
Requires:  apache-commons-codec
66cd316
Requires:  apache-commons-jxpath
66cd316
Requires:  apache-commons-lang
66cd316
Requires:  apache-commons-logging
Stanislav Ochotnicky 7c98f70
Requires:  apache-commons-collections
66cd316
Requires:  jakarta-commons-dbcp
Stanislav Ochotnicky 7c98f70
Requires:  apache-commons-digester
66cd316
Requires:  jakarta-commons-pool
66cd316
Requires:  xerces-j2
66cd316
Requires:  xml-commons-apis
66cd316
66cd316
Requires(post):   jpackage-utils >= 1.7.2
66cd316
Requires(postun): jpackage-utils >= 1.7.2
66cd316
66cd316
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
66cd316
66cd316
Provides:       jakarta-%{short_name} = 0:%{version}-%{release}
66cd316
Obsoletes:      jakarta-%{short_name} < 0:%{version}-%{release}
66cd316
66cd316
%description
66cd316
Configuration is a project to provide a generic Configuration
66cd316
interface and allow the source of the values to vary. It
66cd316
provides easy typed access to single, as well as lists of
66cd316
configuration values based on a 'key'.
66cd316
Right now you can load properties from a simple properties
66cd316
file, a properties file in a jar, an XML file, JNDI settings,
66cd316
as well as use a mix of different sources using a
66cd316
ConfigurationFactory and CompositeConfiguration.
66cd316
Custom configuration objects are very easy to create now
66cd316
by just subclassing AbstractConfiguration. This works
66cd316
similar to how AbstractList works.
66cd316
66cd316
%package        javadoc
66cd316
Summary:        API documentation for %{name}
66cd316
Group:          Documentation
66cd316
Requires:       jpackage-utils
66cd316
66cd316
Provides:       jakarta-%{short_name}-javadoc = 0:%{version}-%{release}
66cd316
Obsoletes:      jakarta-%{short_name}-javadoc < 0:%{version}-%{release}
66cd316
66cd316
%description    javadoc
66cd316
%{summary}.
66cd316
66cd316
66cd316
%prep
66cd316
%setup -q -n %{short_name}-%{version}-src
66cd316
%patch0 -p1
Stanislav Ochotnicky e173b25
%patch1 -p1
66cd316
%{__sed} -i 's/\r//' LICENSE.txt
66cd316
66cd316
%build
Stanislav Ochotnicky e173b25
# we skip tests because we don't have test deps
Stanislav Ochotnicky e173b25
mvn-rpmbuild -Dmaven.test.skip=true \
66cd316
        install javadoc:javadoc
66cd316
66cd316
%install
66cd316
# jars
66cd316
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
Stanislav Ochotnicky e173b25
install -p -m 644 target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
Stanislav Ochotnicky e173b25
ln -sf %{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{short_name}.jar
66cd316
66cd316
66cd316
# javadoc
Stanislav Ochotnicky e173b25
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
Stanislav Ochotnicky e173b25
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
66cd316
66cd316
# Install pom
66cd316
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
66cd316
install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{short_name}.pom
66cd316
%add_to_maven_depmap org.apache.commons %{short_name} %{version} JPP %{short_name}
66cd316
66cd316
# following line is only for backwards compatibility. New packages
66cd316
# should use proper groupid org.apache.commons and also artifactid
66cd316
%add_to_maven_depmap %{short_name} %{short_name} %{version} JPP %{short_name}
66cd316
Stanislav Ochotnicky e173b25
%pre javadoc
Stanislav Ochotnicky e173b25
# workaround for rpm bug, can be removed in F-17
Stanislav Ochotnicky e173b25
[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
Stanislav Ochotnicky e173b25
rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
66cd316
66cd316
%post
66cd316
%update_maven_depmap
66cd316
66cd316
%postun
66cd316
%update_maven_depmap
66cd316
66cd316
%files
66cd316
%defattr(-,root,root,-)
66cd316
%{_mavendepmapfragdir}/*
66cd316
%{_mavenpomdir}/JPP-%{short_name}.pom
66cd316
%doc LICENSE.txt
66cd316
%{_javadir}/*.jar
66cd316
66cd316
%files javadoc
66cd316
%defattr(-,root,root,-)
cd707a2
%doc LICENSE.txt
66cd316
%doc %{_javadocdir}/%{name}
66cd316
66cd316
66cd316
%changelog
Stanislav Ochotnicky e173b25
* Tue Feb 15 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.6-5
Stanislav Ochotnicky e173b25
- Change ant dep groupId to org.apache.ant to fix build
Stanislav Ochotnicky e173b25
- Versionless jar & javadocs
Stanislav Ochotnicky e173b25
- Use maven 3 to build
Stanislav Ochotnicky e173b25
3aa8a11
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-4
3aa8a11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
3aa8a11
Stanislav Ochotnicky 7c98f70
* Thu Oct 14 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.6-3
Stanislav Ochotnicky 7c98f70
- tomcat5 -> tomcat6 BRs/Rs
Stanislav Ochotnicky 7c98f70
- jakarta -> apache BRs/Rs
Stanislav Ochotnicky 7c98f70
cd707a2
* Thu Jul  8 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.6-2
cd707a2
- Add license to javadoc subpackage
cd707a2
66cd316
* Thu May 27 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.6-1
66cd316
- Rename package (jakarta-commons-configuration->apache-commons-configuration)
66cd316
- Build with maven instead of ant, drop deprecated patches
66cd316
- Rebase, cleanups, drop epoch
66cd316
66cd316
* Thu Aug 20 2009 Alexander Kurtakov <akurtako@redhat.com> 0:1.4-7
66cd316
- Fix description.
66cd316
- Remove requires(post/postun) for javadoc subpackage.
66cd316
- Use sed instead of dos2unix.
66cd316
66cd316
* Thu Aug 20 2009 Alexander Kurtakov <akurtako@redhat.com> 0:1.4-6
66cd316
- Remove gcj support.
66cd316
- Initial build for Fedora.
66cd316
66cd316
* Mon May 18 2009 Fernando Nasser <fnasser@redhat.com> - 0:1.4-5
66cd316
- Fix license
66cd316
- Fix source URL
66cd316
66cd316
* Wed Mar 18 2009 Yong Yang <yyang@redhat.com> - 0:1.4-4
66cd316
- rebuild with new maven2 2.0.8 built in bootstrap mode
66cd316
66cd316
* Thu Feb 05 2009 Yong Yang <yyang@redhat.com> - 0:1.4-3
66cd316
- Fix release tag
66cd316
66cd316
* Wed Jan 14 2009 Yong Yang <yyang@redhat.com> - 0:1.4-2jpp
66cd316
- Import from dbhole's maven 2.0.8 packages, initial building
66cd316
66cd316
* Mon Aug 13 2007 Ralph Apel <r.apel at r-apel.de> - 0:1.4-1jpp
66cd316
- Upgrade to 1.4
66cd316
- Add pom file
66cd316
66cd316
* Thu May 03 2007 Ralph Apel <r.apel at r-apel.de> - 0:1.2-3jpp
66cd316
- Patch one test
66cd316
66cd316
* Wed Mar 07 2007 Ralph Apel <r.apel at r-apel.de> - 0:1.2-2jpp
66cd316
- Add gcj_support option
66cd316
- Optionally build without maven
66cd316
66cd316
* Mon Feb 20 2006 Ralph Apel <r.apel at r-apel.de> - 0:1.2-1jpp
66cd316
- Upgrade to 1.2
66cd316
66cd316
* Mon Feb 20 2006 Ralph Apel <r.apel at r-apel.de> - 0:1.1-2jpp
66cd316
- Rebuild for JPP-1.7 and maven-1.1
66cd316
66cd316
* Thu Sep 15 2005 Ralph Apel <r.apel at r-apel.de> - 0:1.1-1jpp
66cd316
- Upgrade to 1.1
66cd316
- Omit findbugs and tasks reports: don't have these plugins yet
66cd316
- Requires java 1.4.2 to build
66cd316
66cd316
* Mon Feb 21 2005 Ralph Apel <r.apel at r-apel.de> - 0:1.0.f-1jpp
66cd316
- Upgrade to 1.0 final, letter in version can be bumped with 1.1
66cd316
- Prepare for build with maven, but still build with ant
66cd316
66cd316
* Sun Aug 23 2004 Randy Watler <rwatler at finali.com> - 0:1.0.d3-2jpp
66cd316
- Rebuild with ant-1.6.2
66cd316
- Upgrade to Ant 1.6.X
66cd316
* Mon Jan 19 2004 Ralph Apel <r.apel at r-apel.de> - 0:1.0.d3-1jpp
66cd316
- First JPackage release