8c10fb
%bcond_without  avalon
8c10fb
8c10fb
Name:           apache-commons-logging
8c10fb
Version:        1.2
8c10fb
Release:        13%{?dist}
8c10fb
Summary:        Apache Commons Logging
8c10fb
License:        ASL 2.0
8c10fb
URL:            http://commons.apache.org/logging
8c10fb
BuildArch:      noarch
8c10fb
8c10fb
Source0:        http://www.apache.org/dist/commons/logging/source/commons-logging-%{version}-src.tar.gz
8c10fb
Source2:        http://mirrors.ibiblio.org/pub/mirrors/maven2/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.pom
8c10fb
8c10fb
Patch0:         0001-Generate-different-Bundle-SymbolicName-for-different.patch
8c10fb
Patch1:         0002-Port-to-maven-jar-plugin-3.0.0.patch
8c10fb
8c10fb
BuildRequires:  maven-local
8c10fb
%if %{with avalon}
8c10fb
BuildRequires:  mvn(avalon-framework:avalon-framework-api)
8c10fb
BuildRequires:  mvn(avalon-framework:avalon-framework-impl)
8c10fb
BuildRequires:  mvn(logkit:logkit)
8c10fb
%endif
8c10fb
BuildRequires:  mvn(javax.servlet:servlet-api)
8c10fb
BuildRequires:  mvn(junit:junit)
8c10fb
BuildRequires:  mvn(log4j:log4j:12)
8c10fb
BuildRequires:  mvn(org.apache.commons:commons-parent:pom:)
8c10fb
BuildRequires:  mvn(org.apache.maven.plugins:maven-failsafe-plugin)
8c10fb
BuildRequires:  mvn(org.apache.maven.plugins:maven-dependency-plugin)
8c10fb
BuildRequires:  mvn(org.codehaus.mojo:build-helper-maven-plugin)
8c10fb
8c10fb
%description
8c10fb
The commons-logging package provides a simple, component oriented
8c10fb
interface (org.apache.commons.logging.Log) together with wrappers for
8c10fb
logging systems. The user can choose at runtime which system they want
8c10fb
to use. In addition, a small number of basic implementations are
8c10fb
provided to allow users to use the package standalone.
8c10fb
commons-logging was heavily influenced by Avalon's Logkit and Log4J. The
8c10fb
commons-logging abstraction is meant to minimize the differences between
8c10fb
the two, and to allow a developer to not tie himself to a particular
8c10fb
logging implementation.
8c10fb
8c10fb
%{?javadoc_package}
8c10fb
8c10fb
%prep
8c10fb
%autosetup -p1 -n commons-logging-%{version}-src
8c10fb
8c10fb
%if %{with avalon}
8c10fb
# Sent upstream https://issues.apache.org/jira/browse/LOGGING-143
8c10fb
%pom_remove_dep :avalon-framework
8c10fb
%pom_add_dep avalon-framework:avalon-framework-api:4.3:provided
8c10fb
%pom_add_dep avalon-framework:avalon-framework-impl:4.3:test
8c10fb
%pom_xpath_inject "pom:dependency[pom:artifactId='logkit']" '<scope>provided</scope>'
8c10fb
8c10fb
%else
8c10fb
%pom_remove_dep -r :avalon-framework
8c10fb
%pom_remove_dep -r :logkit
8c10fb
rm -r src/test/java/org/apache/commons/logging/{avalon,logkit}
8c10fb
rm src/main/java/org/apache/commons/logging/impl/AvalonLogger.java
8c10fb
rm src/main/java/org/apache/commons/logging/impl/LogKitLogger.java
8c10fb
%endif
8c10fb
8c10fb
%pom_remove_plugin :cobertura-maven-plugin
8c10fb
%pom_remove_plugin :maven-scm-publish-plugin
8c10fb
8c10fb
sed -i 's/\r//' RELEASE-NOTES.txt LICENSE.txt NOTICE.txt
8c10fb
8c10fb
# for compatibility reasons
8c10fb
%mvn_file ":commons-logging{*}" "commons-logging@1" "%{name}@1"
8c10fb
%mvn_alias ":commons-logging{*}" "org.apache.commons:commons-logging@1" "apache:commons-logging@1"
8c10fb
8c10fb
# Remove log4j12 tests
8c10fb
rm -rf src/test/java/org/apache/commons/logging/log4j/log4j12
8c10fb
8c10fb
%build
8c10fb
%mvn_build
8c10fb
8c10fb
# The build produces more artifacts from one pom
8c10fb
%mvn_artifact %{SOURCE2} target/commons-logging-%{version}-api.jar
8c10fb
%mvn_artifact commons-logging:commons-logging-adapters:%{version} target/commons-logging-%{version}-adapters.jar
8c10fb
8c10fb
%install
8c10fb
%mvn_install
8c10fb
8c10fb
%files -f .mfiles
8c10fb
%license LICENSE.txt NOTICE.txt
8c10fb
%doc PROPOSAL.html RELEASE-NOTES.txt
8c10fb
8c10fb
%changelog
8c10fb
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-13
8c10fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
8c10fb
8c10fb
* Mon Jan 29 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2-12
8c10fb
- Cleanup spec file
8c10fb
8c10fb
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-11
8c10fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
8c10fb
8c10fb
* Wed Mar 22 2017 Michael Simacek <msimacek@redhat.com> - 1.2-10
8c10fb
- Avoid %%add_maven_depmap
8c10fb
8c10fb
* Mon Feb 13 2017 Michael Simacek <msimacek@redhat.com> - 1.2-9
8c10fb
- Fix conditional
8c10fb
8c10fb
* Fri Feb 10 2017 Michael Simacek <msimacek@redhat.com> - 1.2-8
8c10fb
- Use log4j12
8c10fb
- Add avalon conditional
8c10fb
8c10fb
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-7
8c10fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
8c10fb
8c10fb
* Tue May 31 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2-6
8c10fb
- Port to maven-jar-plugin 3.0.0
8c10fb
8c10fb
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-5
8c10fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
8c10fb
8c10fb
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-4
8c10fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
8c10fb
8c10fb
* Mon Mar  9 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2-3
8c10fb
- Add aliases for apache groupId
8c10fb
8c10fb
* Tue Jul 29 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2-2
8c10fb
- Generate different Bundle-SymbolicName for different JARs
8c10fb
- Resolves: rhbz#1123055
8c10fb
8c10fb
* Sun Jul 20 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2-1
8c10fb
- Update to upstream version 1.2
8c10fb
8c10fb
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-13
8c10fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
8c10fb
8c10fb
* Tue May 13 2014 Michael Simacek <msimacek@redhat.com> - 1.1.3-12
8c10fb
- Disable tests that use log4j12
8c10fb
8c10fb
* Tue Mar 04 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.3-11
8c10fb
- Use Requires: java-headless rebuild (#1067528)
8c10fb
8c10fb
* Thu Feb 20 2014 Michael Simacek <msimacek@redhat.com> - 1.1.3-10
8c10fb
- Set logkit dependency scope to provided
8c10fb
8c10fb
* Thu Feb 20 2014 Michael Simacek <msimacek@redhat.com> - 1.1.3-9
8c10fb
- Set avalon dependency scope to provided
8c10fb
8c10fb
* Wed Jan 22 2014 Michal Srb <msrb@redhat.com> - 1.1.3-8
8c10fb
- Run all the tests agains
8c10fb
8c10fb
* Sun Aug 11 2013 Michal Srb <msrb@redhat.com> - 1.1.3-7
8c10fb
- Make this package noarch again (Resolves: rhbz#995756)
8c10fb
8c10fb
* Tue Aug 06 2013 Michal Srb <msrb@redhat.com> - 1.1.3-6
8c10fb
- Temporarily remove test which fails in koji
8c10fb
8c10fb
* Mon Aug 05 2013 Michal Srb <msrb@redhat.com> - 1.1.3-5
8c10fb
- Add missing BR: maven-dependency-plugin, build-helper-maven-plugin
8c10fb
8c10fb
* Mon Aug 05 2013 Michal Srb <msrb@redhat.com> - 1.1.3-4
8c10fb
- Add missing BR: maven-failsafe-plugin
8c10fb
8c10fb
* Mon Aug 05 2013 Michal Srb <msrb@redhat.com> - 1.1.3-3
8c10fb
- Adapt to current guidelines
8c10fb
8c10fb
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-2
8c10fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
8c10fb
8c10fb
* Tue May 21 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.1.3-1
8c10fb
- Update to upstream version 1.1.3
8c10fb
- Remove OSGi Bundle-SymbolicName patch (accepted upstream)
8c10fb
8c10fb
* Tue Apr  9 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.1.2-2
8c10fb
- Set OSGi Bundle-SymbolicName to org.apache.commons.logging
8c10fb
- Resolves: rhbz#949842
8c10fb
8c10fb
* Mon Apr  8 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.1.2-1
8c10fb
- Update to upstream version 1.1.2
8c10fb
- Convert POM to POM macros
8c10fb
- Remove OSGi manifest patch; fixed upstream
8c10fb
8c10fb
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-23
8c10fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
8c10fb
8c10fb
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 1.1.1-22
8c10fb
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
8c10fb
- Replace maven BuildRequires with maven-local
8c10fb
8c10fb
* Thu Nov 22 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.1.1-21
8c10fb
- Install NOTICE file
8c10fb
- Resolves: rhbz#879581
8c10fb
8c10fb
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-20
8c10fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
8c10fb
8c10fb
* Tue May 1 2012 Alexander Kurtakov <akurtako@redhat.com> 1.1.1-19
8c10fb
- Bring back jakarta-commons-logging provides/obsoletes - the comment was misleading.
8c10fb
8c10fb
* Mon Apr 30 2012 Alexander Kurtakov <akurtako@redhat.com> 1.1.1-18
8c10fb
- Fix build with latest libs.
8c10fb
- Adapt to current guidelines.
8c10fb
8c10fb
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-17
8c10fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
8c10fb
8c10fb
* Thu Apr 21 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-16
8c10fb
- Build with maven 3
8c10fb
- Fix build for avalon-framework
8c10fb
8c10fb
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-15
8c10fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
8c10fb
8c10fb
* Thu Dec 16 2010 Alexander Kurtakov <akurtako@redhat.com> 1.1.1-14
8c10fb
- Bring back commons-logging* symlinks.
8c10fb
8c10fb
* Thu Dec 16 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-13
8c10fb
- Replace tomcat6 BR with servlet25 only
8c10fb
- Cleanups according to new packaging guidelines
8c10fb
- Install maven metadata for -api jar
8c10fb
- Versionless jars/javadocs
8c10fb
8c10fb
* Tue Nov  9 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-12
8c10fb
- Add depmaps for api and adapters subpackages
8c10fb
- Use apache-commons-parent BR instead of maven-*
8c10fb
- Replace tomcat5 BR with tomcat6
8c10fb
- Reenable tests
8c10fb
8c10fb
* Thu Jul  8 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-11
8c10fb
- Add license to javadoc subpackage
8c10fb
8c10fb
* Wed Jun 9 2010 Alexander Kurtakov <akurtako@redhat.com> 1.1.1-10
8c10fb
- Add osgi manifest entries.
8c10fb
8c10fb
* Fri May 21 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-9
8c10fb
- Correct depmap filename for backward compatibility
8c10fb
8c10fb
* Mon May 17 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-8
8c10fb
- Fix wrong depmap JPP name to short_name
8c10fb
- Add obsoletes to javadoc subpackage
8c10fb
8c10fb
* Wed May 12 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-7
8c10fb
- Fix symlink problems introduced previously in r5
8c10fb
8c10fb
* Tue May 11 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-6
8c10fb
- Add one more add_to_maven_depmap for backward compatibility
8c10fb
8c10fb
* Mon May 10 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-5
8c10fb
- Fix up add_to_maven_depmap
8c10fb
- Add jpackage-utils Requires for javadoc
8c10fb
- Cleanup install a bit
8c10fb
8c10fb
* Fri May  7 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-4
8c10fb
- Fix provides
8c10fb
8c10fb
* Thu May  6 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-3
8c10fb
- Revert to using default permissions
8c10fb
- Drop "Package" from summary, improve javadoc summary text
8c10fb
8c10fb
* Thu May  6 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-2
8c10fb
- Fix EOLs on docs
8c10fb
- Create javadoc symlinks during install
8c10fb
- Use version macro in Source0 URL, use _mavenpomdir macro
8c10fb
8c10fb
* Thu May  6 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-1
8c10fb
- Rename and rebase from jakarta-commons-logging