Merge modular branch

This commit is contained in:
Mikolaj Izdebski 2021-05-13 17:23:00 +02:00
commit a009e95854
2 changed files with 17 additions and 21 deletions

View File

@ -1,4 +1,4 @@
%bcond_with avalon %bcond_without bootstrap
Name: apache-commons-logging Name: apache-commons-logging
Version: 1.2 Version: 1.2
@ -15,18 +15,16 @@ Patch0: 0001-Generate-different-Bundle-SymbolicName-for-different.patch
Patch1: 0002-Port-to-maven-jar-plugin-3.0.0.patch Patch1: 0002-Port-to-maven-jar-plugin-3.0.0.patch
BuildRequires: maven-local BuildRequires: maven-local
%if %{with avalon} %if %{with bootstrap}
BuildRequires: mvn(avalon-framework:avalon-framework-api) BuildRequires: javapackages-bootstrap
BuildRequires: mvn(avalon-framework:avalon-framework-impl) %else
BuildRequires: mvn(logkit:logkit)
%endif
BuildRequires: mvn(javax.servlet:servlet-api) BuildRequires: mvn(javax.servlet:servlet-api)
BuildRequires: mvn(junit:junit) BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.logging.log4j:log4j-1.2-api)
BuildRequires: mvn(org.apache.commons:commons-parent:pom:) BuildRequires: mvn(org.apache.commons:commons-parent:pom:)
BuildRequires: mvn(org.apache.maven.plugins:maven-failsafe-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-failsafe-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
%endif
%description %description
The commons-logging package provides a simple, component oriented The commons-logging package provides a simple, component oriented
@ -44,23 +42,15 @@ logging implementation.
%prep %prep
%autosetup -p1 -n commons-logging-%{version}-src %autosetup -p1 -n commons-logging-%{version}-src
%if %{with avalon}
# Sent upstream https://issues.apache.org/jira/browse/LOGGING-143
%pom_remove_dep :avalon-framework
%pom_add_dep avalon-framework:avalon-framework-api:4.3:provided
%pom_add_dep avalon-framework:avalon-framework-impl:4.3:test
%pom_xpath_inject "pom:dependency[pom:artifactId='logkit']" '<scope>provided</scope>'
%else
%pom_remove_dep -r :avalon-framework %pom_remove_dep -r :avalon-framework
%pom_remove_dep -r :logkit %pom_remove_dep -r :logkit
rm -r src/test/java/org/apache/commons/logging/{avalon,logkit} %pom_remove_dep -r :log4j
rm src/main/java/org/apache/commons/logging/impl/AvalonLogger.java rm src/main/java/org/apache/commons/logging/impl/AvalonLogger.java
rm src/main/java/org/apache/commons/logging/impl/Log4JLogger.java
rm src/main/java/org/apache/commons/logging/impl/LogKitLogger.java rm src/main/java/org/apache/commons/logging/impl/LogKitLogger.java
%endif rm -r src/test/java/org/apache/commons/logging/{avalon,log4j,logkit}
rm src/test/java/org/apache/commons/logging/pathable/{Parent,Child}FirstTestCase.java
# Switch to log4j 2.x API
%pom_change_dep log4j:log4j org.apache.logging.log4j:log4j-1.2-api
# Avoid hard-coded versions in OSGi metadata # Avoid hard-coded versions in OSGi metadata
%pom_xpath_set "pom:properties/pom:commons.osgi.import" '*;resolution:=optional' %pom_xpath_set "pom:properties/pom:commons.osgi.import" '*;resolution:=optional'
@ -78,7 +68,7 @@ sed -i 's/\r//' RELEASE-NOTES.txt LICENSE.txt NOTICE.txt
rm -rf src/test/java/org/apache/commons/logging/log4j/log4j12 rm -rf src/test/java/org/apache/commons/logging/log4j/log4j12
%build %build
%mvn_build -- -Dcommons.osgi.symbolicName=org.apache.commons.logging -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8 %mvn_build -- -Dmaven.compiler.source=1.6 -Dmaven.compiler.target=1.6 -Dcommons.osgi.symbolicName=org.apache.commons.logging
# The build produces more artifacts from one pom # The build produces more artifacts from one pom
%mvn_artifact %{SOURCE2} target/commons-logging-%{version}-api.jar %mvn_artifact %{SOURCE2} target/commons-logging-%{version}-api.jar
@ -113,9 +103,15 @@ rm -rf src/test/java/org/apache/commons/logging/log4j/log4j12
* Sat Nov 09 2019 Fabio Valentini <decathorpe@gmail.com> - 1.2-19 * Sat Nov 09 2019 Fabio Valentini <decathorpe@gmail.com> - 1.2-19
- Disable avalon support by default. - Disable avalon support by default.
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2-15
- Mass rebuild for javapackages-tools 201902
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-18 * Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2-14
- Mass rebuild for javapackages-tools 201901
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-17 * Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

View File

@ -1 +1 @@
ce977548f1cbf46918e93cd38ac35163 commons-logging-1.2-src.tar.gz SHA512 (commons-logging-1.2-src.tar.gz) = 9f3761184950f2f13e85d8bc447709ab8be631dfd231b4f053f8147468db1bf71fb116ddba95e39f4afc4cf28c742e07d40c7a637f28004a60dc13935f9609f9