diff --git a/apache-commons-logging.changes b/apache-commons-logging.changes index be8c9cb..f81480c 100644 --- a/apache-commons-logging.changes +++ b/apache-commons-logging.changes @@ -1,3 +1,86 @@ +------------------------------------------------------------------- +Fri Aug 9 08:05:34 UTC 2024 - Gus Kenion + +- Upgrade to 1.3.3 + * Bug Fixes: + + * LOGGING-193: Update Log4j 2 OSGi imports #268. + + * Fix PMD UnnecessaryFullyQualifiedName in SimpleLog. + + * Fix NullPointerException in SimpleLog#write(Object) on null + input. + + Fix NullPointerException in SimpleLog#write(StringBuffer) on + null input. +- Includes changes from 1.3.2 + * Fixed Bugs + + LOGGING-190: Add OSGi metadata to enable Service Loader + Mediator #234. + + LOGGING-191: Apache commons logging shows 1.4 as latest + release instead of 1.3.1. + + Deprecate + org.apache.commons.logging.LogSource.jdk14IsAvailable. +- Includes changes from 1.3.1 + * New features + + Add Maven property project.build.outputTimestamp for build + reproducibility. + * Fixed Bugs + + Remove references to very old JDK and Commons Logging + versions #201. + + Update from Logj 1 to the Log4j 2 API compatibility layer + #231. + + Allow Servlet 4 in OSGi environment #191. + + Fix generics warnings #213. + + LOGGING-189: Fix Import-Package entry for org.slf4j #188. +- Includes changes from 1.3.0 + * New Features: + + Add support for Log4j API and SLF4J #177. + + Deprecate org.apache.commons.logging.impl.WeakHashtable + without replacement. LOGGING-188: Deprecate and disable + `Jdk13LumberjackLogger` and `Log4JLogger`. LOGGING-173: + + Deprecate and disable `AvalonLogger` and `LogKitLogger`. + + LOGGING-165: Add Automatic-Module-Name Manifest Header for + Java 9 compatibility. + * Fixed Bugs: + + LOGGING-163: BufferedReader is not closed properly. + + LOGGING-177: Remove redundant initializer #46 + + Use a weak reference for the cached class loader #71. + + Add more entries to .gitignore file #25. + + Minor Improvements #34. + + [StepSecurity] ci: Harden GitHub Actions #145. + + LOGGING-185: Replace custom code with `ServiceLoader` call. + + Fix possible NPEs in LogFactoryImpl. + + LOGGING-185: Fix failing tests #180. + + Deprecate LogConfigurationException.cause in favor of + getCause(). + + Fix SpotBugs [ERROR] High: Found reliance on default encoding + in org.apache.commons.logging.LogFactory.initDiagnostics(): + new java.io.PrintStream(OutputStream) + [org.apache.commons.logging.LogFactory] At + LogFactory.java:[line 1205] DM_DEFAULT_ENCODING. + + Fix SpotBugs [ERROR] Medium: Class + org.apache.commons.logging.impl.WeakHashtable defines + non-transient non-serializable instance field queue + [org.apache.commons.logging.impl.WeakHashtable] In + WeakHashtable.java SE_BAD_FIELD. + + Set java.logging as optional module #183. + + Fix SpotBugs [ERROR] Medium: Switch statement found in + org.apache.commons.logging.impl.SimpleLog.log(int, Object, + Throwable) where default case is missing + [org.apache.commons.logging.impl.SimpleLog] At + SimpleLog.java:[lines 505-522] SF_SWITCH_NO_DEFAULT. + + Deprecate + org.apache.commons.logging.impl.Jdk13LumberjackLogger.dummyLevel + without replacement. +- Remove deprecated patch files: + * commons-logging-1.1.3-src-junit.diff + * commons-logging-1.2-sourcetarget.patch + * commons-logging-manifests.patch + * no-tests.patch +- Reinstate ant build (removed upstream) + * add build.xml + * add build.properties +- Remove unnecessary dependencies + * add commons-logging-1.3.3-dependencies.patch +- Add upstream dev's public key to apache-commons-logging.keyring + ------------------------------------------------------------------- Tue Feb 20 10:19:08 UTC 2024 - Dominique Leuenberger diff --git a/apache-commons-logging.keyring b/apache-commons-logging.keyring index ea49d9c..14d6e9a 100644 --- a/apache-commons-logging.keyring +++ b/apache-commons-logging.keyring @@ -68,3 +68,42 @@ hE68a/9oR97XTe+8e1VFt+2eWD8lsvbx6avD2hwf9dvyqWO2sHjbmWE+Rn8VpJgX WVvXdM0hFPWrUzI= =ChmV -----END PGP PUBLIC KEY BLOCK----- + + +pub 2048R/A11262CB 2011-04-12 +uid Gary David Gregory (Code signing key) +sig 3 A11262CB 2011-04-12 Gary David Gregory (Code signing key) +sub 2048R/AD3D7F94 2011-04-12 +sig A11262CB 2011-04-12 Gary David Gregory (Code signing key) + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.11 (MingW32) + +mQENBE2kzuwBCACYV+G9yxNkSjAKSji0B5ipMGM74JAL1Ogtcu+993pLHHYsdXri +WWXi37x9PLjeHxw63mN26SFyrbMJ4A8erLB03PDjw0DEzAwiu9P2vSvL/RFxGBbk +cM0BTNXNR1rk8DpIzvXtejp8IHtD1qcDLTlJ8D0W3USebShDPo6NmMxTNuH0u99B +WHCMAdSa34wsg0ZpffwQmRxeA+ebrf2ydKupGkeZsKjkLlaXNkTVp1ghn5ts/lvg +KeHv1SJivWKCRmFlbPhBK4+mxSUSOPdoBNAfxA51QzZoPizSk0VbRz3YufYRVLFy +9vqPSorDmYJhCvn3f6+A38FS/j8VE+8obQ2rABEBAAG0O0dhcnkgRGF2aWQgR3Jl +Z29yeSAoQ29kZSBzaWduaW5nIGtleSkgPGdncmVnb3J5QGFwYWNoZS5vcmc+iQE4 +BBMBAgAiBQJNpM7sAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRCG/cfi +oRJiy2vXCACU6jW2+XIWuWBKSmeowBMxlUMJFSq7QjLt+o6B1ZYClbzBLDKcxlnS +dF6v0jLhp71LozTde+HFI4/qIv6OO4UaGHin8Z1rNU/i5L07HkhLxcrbDoWhaSGD +buRsWCv9ljm5GCXyK9s6Uj7d4af9mDWaGhNFJJFIs+yqOvTwffoaB7y+2a1YWStZ +ZXDJ0KiHdY7xQ7bbYR/61MgvJslF1uX+u4jLTNmbU0tCXLtUrLd2VbJiAMFezqy6 +hV/ZxQLZoBPpr3FYhR2SIzNhQ30nj9AVcPgCCuLD49nx6Ad5CpcP8sTwb4aWk9GK ++Uu3Bfz4jTAvd9Q7TsRMt3NV+7sOGD4vuQENBE2kzuwBCACzeGpkd6X/xTfKDBWv +XgHOOKIJ2pht9XmtZZKiIj7LIiSwvSds/ZkoZKxAm7AY+KPh8Xjf968FtoUBQJvH +AG4rbowEqT7OOrJae2JcenH5qzaod7TpIPQVv+Ysz8I1wLlC6LzKRj1X99Hng6X+ +obsEasnPbmEEkuiZ/Sgi4vVC8SHkDmYt1Dx8jDgm53oUeWkEJO9LSI2zcrZhSgvg +1xa4Q4gY5UUK7gE4LbmGCjFlATuuW/0sryxu8zxph15gkn4Nqgk0CPMSjesMYEGO +sdDzfQXl2tXbt+Pe6mBoWh67MZ1v5zOq3EDtoSqDpWPxponAeaCuNDDFX44vGjfx +GE0tABEBAAGJAR8EGAECAAkFAk2kzuwCGwwACgkQhv3H4qESYsvEMAf/VGyqIEcw +4T2D3gZZ3ITkeoBevQdxBT/27xNvoWOZyGSzGYlRbRQrlo+uZsjfMc9MNvaSmxyy +4gLVbcdvQr3PF//GxphJ98W8pk9l+M57jfyHnnCumn7MO4o9ed+WuigN5oeuNJ6B +Iq3ff2o1DsrEvDChYOJEOeFuWxv+u7I2ABJJep7NbByM2n9PE8vlGU3zUBgWUBsk +6jT+klKnEyHE76WzegPLz3jtElTuyB7jRhjyQJu1yiJEMbs2zH8aJGObi5f8Jum4 +tILZuEAdoI0M3c3VRq12cz/vLy+9VXa/s//8IsGn88kjyyYqOy8WJEjoOXFh++dp +WiM7nZkgQcNi5A== +=0UFs +-----END PGP PUBLIC KEY BLOCK----- diff --git a/apache-commons-logging.spec b/apache-commons-logging.spec index 4676161..c2baf0e 100644 --- a/apache-commons-logging.spec +++ b/apache-commons-logging.spec @@ -20,19 +20,18 @@ %define base_name logging %define short_name commons-%{base_name} Name: apache-%{short_name} -Version: 1.2 +Version: 1.3.3 Release: 0 Summary: Apache Commons Logging License: Apache-2.0 -URL: http://commons.apache.org/%{base_name} -Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz -Source1: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz.asc +URL: https://commons.apache.org/%{base_name} +Source0: https://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz +Source1: https://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz.asc Source2: apache-commons-logging.keyring Source4: http://central.maven.org/maven2/%{short_name}/%{short_name}-api/1.1/%{short_name}-api-1.1.pom -Patch0: commons-logging-1.1.3-src-junit.diff -Patch1: commons-logging-1.2-sourcetarget.patch -Patch2: commons-logging-manifests.patch -Patch3: no-tests.patch +Source5: build.xml +Source6: build.properties +Patch0: commons-logging-1.3.3-dependencies.patch BuildRequires: ant BuildRequires: glassfish-servlet-api BuildRequires: java-devel >= 1.8 @@ -59,10 +58,10 @@ logging implementation. %prep %autosetup -p1 -n %{short_name}-%{version}-src -sed -i 's/\r//' RELEASE-NOTES.txt LICENSE.txt +cp %{SOURCE5} build.xml +cp %{SOURCE6} build.properties -#FIXME -rm ./src/test/java/org/apache/commons/logging/servlet/BasicServletTestCase.java +sed -i 's/\r//' RELEASE-NOTES.txt LICENSE.txt %pom_remove_parent . diff --git a/build.properties b/build.properties new file mode 100644 index 0000000..ffe31a0 --- /dev/null +++ b/build.properties @@ -0,0 +1,59 @@ +# 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 +# +# http://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. + +###################################################################### +# +# TO USE: +# +# Copy this file to build.properties and either +# +# a) Use 'ant getlibs' to populate the default directory +# with dependencies +# or b) Change the property values to appropriate values +# +######################################################################## + +# Apache Log4j 1.2.x series +log4j12.jar=lib/log4j-1.2.12.jar + +# Apache Log4j 1.3.x series +# Note: Log4j 1.3 support not available in the 1.1 release +#log4j13.jar=lib/log4j-1.3.0.jar + +# logkit.jar - Avalon LogKit classes (see http://jakarta.apache.org/avalon) +logkit.jar=lib/logkit-1.0.1.jar + +# Avalon framework - used for wrapper for avalon framework logger +avalon-framework.jar=lib/avalon-framework-4.1.3.jar + +# ServletApi - used to build ServletContextCleaner class +servletapi.jar=lib/servletapi-2.3.jar + +# +# if you want to run the test cases, junit needs to be in the classpath. +# the build.xml uses a default value so you might not need to set this property. +# Note that version junit 3.8 is required and 3.8.1 recommended. +# +junit.jar=lib/junit-3.8.1.jar + +# Maven properties (for web site build) +# Those committers using agents may like to use +#maven.username=rdonkin +#logging.cvs=lserver:rdonkin@cvs.apache.org:/home/cvs + + +# The path to a 1.4 JSDK javac +# Optional - used when building with a 1.2 JVM for releases +# executable.javac1.4=/opt/java/jdks/j2sdk1.4.2_10/bin/javac diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..632d363 --- /dev/null +++ b/build.xml @@ -0,0 +1,811 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Log4j12: ${log4j12.jar} + + + LogKit: ${logkit.jar} + Avalon-Framework: ${avalon-framework.jar} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + *** WARNING *** + Log4j 1.2 not found: Cannot Build Log4JLogger + + + + + + + + + + + *** WARNING *** + LogKit not found: Cannot Build LogKitLogger + + + + + + *** WARNING *** + Avalon-Framework not found: Cannot Build AvalonLogger + + + + + + *** WARNING *** + JDK 1.4 not present: Cannot Build Jdk14Logger + + + + + + *** WARNING *** + Log4J 1.2.x Jar not found: Cannot execute 1.2.x tests + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + *** WARNING *** + Maven generated documentation not found: Documentation distribution will be empty + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + One or more unit tests failed. + + + + + + + + ================================= WARNING ================================ + Junit isn't present in your $ANT_HOME/lib directory. Tests not executed. + ========================================================================== + + + diff --git a/commons-logging-1.1.3-src-junit.diff b/commons-logging-1.1.3-src-junit.diff deleted file mode 100644 index 7ae66bd..0000000 --- a/commons-logging-1.1.3-src-junit.diff +++ /dev/null @@ -1,28 +0,0 @@ -Index: commons-logging-1.1.3-src/build.xml -=================================================================== ---- commons-logging-1.1.3-src.orig/build.xml -+++ commons-logging-1.1.3-src/build.xml -@@ -719,7 +719,8 @@ - - ant -Dtestmatch=**/FooTestCase testall - --> - -- - - -@@ -773,4 +774,13 @@ - - - -+ -+ -+ -+ -+ ================================= WARNING ================================ -+ Junit isn't present in your $ANT_HOME/lib directory. Tests not executed. -+ ========================================================================== -+ -+ - diff --git a/commons-logging-1.2-sourcetarget.patch b/commons-logging-1.2-sourcetarget.patch deleted file mode 100644 index 1761f82..0000000 --- a/commons-logging-1.2-sourcetarget.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- commons-logging-1.2-src/build.xml 2014-07-05 20:11:36.000000000 +0200 -+++ commons-logging-1.2-src/build.xml 2017-09-07 14:05:10.680439161 +0200 -@@ -130,10 +130,10 @@ - - - -- -+ - - -- -+ - - - diff --git a/commons-logging-1.2-src.tar.gz b/commons-logging-1.2-src.tar.gz deleted file mode 100644 index 5a213c4..0000000 --- a/commons-logging-1.2-src.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:49665da5a60d033e6dff40fe0a7f9173e886ae859ce6096c1afe34c48b677c81 -size 188536 diff --git a/commons-logging-1.2-src.tar.gz.asc b/commons-logging-1.2-src.tar.gz.asc deleted file mode 100644 index 570e212..0000000 --- a/commons-logging-1.2-src.tar.gz.asc +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1 - -iQIcBAABAgAGBQJTuEADAAoJEKQfE8mZlFKT5i0P/3nQsu5rXvr9iw3qAmcO3Rzr -HUktzPQslltx3qBlu9No9iaXAGylerGUqv5awdsxVdZYcg7XJZmvVmv0Hz1A3ufm -u25VW8Oj8rpntTf6uzajF1QhI6WcMuJwHCrS7dgVEnBE4LwdMxXO8d9S45wXMz1g -yAUvXDJNUV82Df71rgfEhisupTpSVaicEh21ICdb55KT+rnR3AKaYXJAjyYfYhaQ -b172kmY2QeZJ6Z9k0BiV4EA/rZAW+72JVQMcI3oYvfNH/Y7UwsaIdauHoTbZGcu5 -Ef2I7t9sQYDfFA5hzjaArresq8Qqtmlmb/M3xsTQ6/wRECSF9jqQXh3af6mdm32c -X+pypF9KUk+LEPjpY5XNTLEaDv7+BPwl/16ZpewkDiwbSwJBz05ETzJIUR+Ba6nT -1gTFtU6G9Snrf6+6uEHWhAI8KAZVR/Cxut72+n+kgFCuaXWx9HSUATnyOa1ubAlA -juqKq8xqxqSVi9llloCR6yilNVJsTVd8Fa4NBFJDYn0UYuZ7SPwGzOnbLVdCFu1E -xehEjrdYOPFY9lvD0gXzZ+XudpfDpZ7ei0W3A0LCPjF+imo4+vtW1C1mtZSiy65r -KCAxdUEyVu+7VTkxN1fV6tTWSMFA0gqDoegMofJQDT516hrYfIuSsq/bmIXo6lo8 -9rzG4eXx9tpONF4H9ryS -=lLrj ------END PGP SIGNATURE----- diff --git a/commons-logging-1.3.3-dependencies.patch b/commons-logging-1.3.3-dependencies.patch new file mode 100644 index 0000000..393367f --- /dev/null +++ b/commons-logging-1.3.3-dependencies.patch @@ -0,0 +1,575 @@ +--- a/src/main/java/org/apache/commons/logging/impl/Log4jApiLogFactory.java ++++ /dev/null +@@ -1,239 +0,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 +- * +- * http://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. +- */ +-package org.apache.commons.logging.impl; +- +-import java.io.IOException; +-import java.util.concurrent.ConcurrentHashMap; +-import java.util.concurrent.ConcurrentMap; +- +-import org.apache.commons.logging.Log; +-import org.apache.commons.logging.LogFactory; +-import org.apache.logging.log4j.Level; +-import org.apache.logging.log4j.LogManager; +-import org.apache.logging.log4j.Marker; +-import org.apache.logging.log4j.MarkerManager; +-import org.apache.logging.log4j.spi.AbstractLoggerAdapter; +-import org.apache.logging.log4j.spi.ExtendedLogger; +-import org.apache.logging.log4j.spi.LoggerAdapter; +-import org.apache.logging.log4j.spi.LoggerContext; +-import org.apache.logging.log4j.util.StackLocatorUtil; +- +-/** +- * Logger factory hardcoded to send everything to Log4j API. +- *

+- * Based on the `log4j-jcl` artifact from Apache Logging Services. +- *

+- * +- * @since 1.3.0 +- */ +-public final class Log4jApiLogFactory extends LogFactory { +- +- private static final class Log4j2Log implements Log { +- +- private static final String FQCN = Log4j2Log.class.getName(); +- +- private final ExtendedLogger logger; +- +- public Log4j2Log(final ExtendedLogger logger) { +- this.logger = logger; +- } +- +- @Override +- public void debug(final Object message) { +- logIfEnabled(Level.DEBUG, message, null); +- } +- +- @Override +- public void debug(final Object message, final Throwable t) { +- logIfEnabled(Level.DEBUG, message, t); +- } +- +- @Override +- public void error(final Object message) { +- logIfEnabled(Level.ERROR, message, null); +- } +- +- @Override +- public void error(final Object message, final Throwable t) { +- logIfEnabled(Level.ERROR, message, t); +- } +- +- @Override +- public void fatal(final Object message) { +- logIfEnabled(Level.FATAL, message, null); +- } +- +- @Override +- public void fatal(final Object message, final Throwable t) { +- logIfEnabled(Level.FATAL, message, t); +- } +- +- @Override +- public void info(final Object message) { +- logIfEnabled(Level.INFO, message, null); +- } +- +- @Override +- public void info(final Object message, final Throwable t) { +- logIfEnabled(Level.INFO, message, t); +- } +- +- @Override +- public boolean isDebugEnabled() { +- return isEnabled(Level.DEBUG); +- } +- +- private boolean isEnabled(final Level level) { +- return logger.isEnabled(level, MARKER, null); +- } +- +- @Override +- public boolean isErrorEnabled() { +- return isEnabled(Level.ERROR); +- } +- +- @Override +- public boolean isFatalEnabled() { +- return isEnabled(Level.FATAL); +- } +- +- @Override +- public boolean isInfoEnabled() { +- return isEnabled(Level.INFO); +- } +- +- @Override +- public boolean isTraceEnabled() { +- return isEnabled(Level.TRACE); +- } +- +- @Override +- public boolean isWarnEnabled() { +- return isEnabled(Level.WARN); +- } +- +- private void logIfEnabled(final Level level, final Object message, final Throwable t) { +- if (message instanceof CharSequence) { +- logger.logIfEnabled(FQCN, level, MARKER, (CharSequence) message, t); +- } else { +- logger.logIfEnabled(FQCN, level, MARKER, message, t); +- } +- } +- +- @Override +- public void trace(final Object message) { +- logIfEnabled(Level.TRACE, message, null); +- } +- +- @Override +- public void trace(final Object message, final Throwable t) { +- logIfEnabled(Level.TRACE, message, t); +- } +- +- @Override +- public void warn(final Object message) { +- logIfEnabled(Level.WARN, message, null); +- } +- +- @Override +- public void warn(final Object message, final Throwable t) { +- logIfEnabled(Level.WARN, message, t); +- } +- } +- private static final class LogAdapter extends AbstractLoggerAdapter { +- +- @Override +- protected LoggerContext getContext() { +- return getContext(LogManager.getFactory().isClassLoaderDependent() ? StackLocatorUtil.getCallerClass( +- LogFactory.class) : null); +- } +- +- @Override +- protected Log newLogger(final String name, final LoggerContext context) { +- return new Log4j2Log(context.getLogger(name)); +- } +- +- } +- +- private static final String[] EMPTY_ARRAY = {}; +- +- /** +- * Marker used by all messages coming from Apache Commons Logging. +- */ +- private static final Marker MARKER = MarkerManager.getMarker("COMMONS-LOGGING"); +- +- /** +- * Caches Log instances +- */ +- private final LoggerAdapter adapter = new LogAdapter(); +- +- private final ConcurrentMap attributes = new ConcurrentHashMap<>(); +- +- /** +- * Constructs a new instance. +- */ +- public Log4jApiLogFactory() { +- // empty +- } +- +- @Override +- public Object getAttribute(final String name) { +- return attributes.get(name); +- } +- +- @Override +- public String[] getAttributeNames() { +- return attributes.keySet().toArray(EMPTY_ARRAY); +- } +- +- @Override +- public Log getInstance(final Class clazz) { +- return getInstance(clazz.getName()); +- } +- +- @Override +- public Log getInstance(final String name) { +- return adapter.getLogger(name); +- } +- +- /** +- * This method is supposed to clear all loggers. In this implementation it will clear all the logger +- * wrappers but the loggers managed by the underlying logger context will not be. +- */ +- @Override +- public void release() { +- try { +- adapter.close(); +- } catch (final IOException ignored) { +- // Ignore +- } +- } +- +- @Override +- public void removeAttribute(final String name) { +- attributes.remove(name); +- } +- +- @Override +- public void setAttribute(final String name, final Object value) { +- if (value != null) { +- attributes.put(name, value); +- } else { +- removeAttribute(name); +- } +- } +-} +--- a/src/main/java/org/apache/commons/logging/impl/Slf4jLogFactory.java ++++ /dev/null +@@ -1,330 +0,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 +- * +- * http://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. +- */ +-package org.apache.commons.logging.impl; +- +-import static org.slf4j.spi.LocationAwareLogger.DEBUG_INT; +-import static org.slf4j.spi.LocationAwareLogger.ERROR_INT; +-import static org.slf4j.spi.LocationAwareLogger.INFO_INT; +-import static org.slf4j.spi.LocationAwareLogger.TRACE_INT; +-import static org.slf4j.spi.LocationAwareLogger.WARN_INT; +- +-import java.util.concurrent.ConcurrentHashMap; +-import java.util.concurrent.ConcurrentMap; +- +-import org.apache.commons.logging.Log; +-import org.apache.commons.logging.LogConfigurationException; +-import org.apache.commons.logging.LogFactory; +-import org.slf4j.ILoggerFactory; +-import org.slf4j.Logger; +-import org.slf4j.LoggerFactory; +-import org.slf4j.Marker; +-import org.slf4j.MarkerFactory; +-import org.slf4j.spi.LocationAwareLogger; +- +-/** +- * Logger factory hardcoded to send everything to SLF4J. +- * +- * @since 1.3.0 +- */ +-public final class Slf4jLogFactory extends LogFactory { +- +- private static final class Slf4jLocationAwareLog implements Log { +- +- private static final String FQCN = Slf4jLocationAwareLog.class.getName(); +- +- private final LocationAwareLogger logger; +- +- public Slf4jLocationAwareLog(final LocationAwareLogger logger) { +- this.logger = logger; +- } +- +- @Override +- public void debug(final Object message) { +- log(DEBUG_INT, message, null); +- } +- +- @Override +- public void debug(final Object message, final Throwable t) { +- log(DEBUG_INT, message, t); +- } +- +- @Override +- public void error(final Object message) { +- log(ERROR_INT, message, null); +- } +- +- @Override +- public void error(final Object message, final Throwable t) { +- log(ERROR_INT, message, t); +- } +- +- @Override +- public void fatal(final Object message) { +- error(message); +- } +- +- @Override +- public void fatal(final Object message, final Throwable t) { +- error(message, t); +- } +- +- @Override +- public void info(final Object message) { +- log(INFO_INT, message, null); +- } +- +- @Override +- public void info(final Object message, final Throwable t) { +- log(INFO_INT, message, t); +- } +- +- @Override +- public boolean isDebugEnabled() { +- return logger.isDebugEnabled(MARKER); +- } +- +- @Override +- public boolean isErrorEnabled() { +- return logger.isErrorEnabled(MARKER); +- } +- +- @Override +- public boolean isFatalEnabled() { +- return isErrorEnabled(); +- } +- +- @Override +- public boolean isInfoEnabled() { +- return logger.isInfoEnabled(MARKER); +- } +- +- @Override +- public boolean isTraceEnabled() { +- return logger.isTraceEnabled(MARKER); +- } +- +- @Override +- public boolean isWarnEnabled() { +- return logger.isWarnEnabled(MARKER); +- } +- +- private void log(final int level, final Object message, final Throwable t) { +- logger.log(MARKER, FQCN, level, String.valueOf(message), EMPTY_OBJECT_ARRAY, t); +- } +- +- @Override +- public void trace(final Object message) { +- log(TRACE_INT, message, null); +- } +- +- @Override +- public void trace(final Object message, final Throwable t) { +- log(TRACE_INT, message, t); +- } +- +- @Override +- public void warn(final Object message) { +- log(WARN_INT, message, null); +- } +- +- @Override +- public void warn(final Object message, final Throwable t) { +- log(WARN_INT, message, t); +- } +- } +- private static class Slf4jLog implements Log { +- +- private final Logger logger; +- +- public Slf4jLog(final Logger logger) { +- this.logger = logger; +- } +- +- @Override +- public void debug(final Object message) { +- logger.debug(MARKER, String.valueOf(message)); +- } +- +- @Override +- public void debug(final Object message, final Throwable t) { +- logger.debug(MARKER, String.valueOf(message), t); +- } +- +- @Override +- public void error(final Object message) { +- logger.error(MARKER, String.valueOf(message)); +- } +- +- @Override +- public void error(final Object message, final Throwable t) { +- logger.debug(MARKER, String.valueOf(message), t); +- } +- +- @Override +- public void fatal(final Object message) { +- error(message); +- } +- +- @Override +- public void fatal(final Object message, final Throwable t) { +- error(message, t); +- } +- +- @Override +- public void info(final Object message) { +- logger.info(MARKER, String.valueOf(message)); +- } +- +- @Override +- public void info(final Object message, final Throwable t) { +- logger.info(MARKER, String.valueOf(message), t); +- } +- +- @Override +- public boolean isDebugEnabled() { +- return logger.isDebugEnabled(MARKER); +- } +- +- @Override +- public boolean isErrorEnabled() { +- return logger.isErrorEnabled(MARKER); +- } +- +- @Override +- public boolean isFatalEnabled() { +- return isErrorEnabled(); +- } +- +- @Override +- public boolean isInfoEnabled() { +- return logger.isInfoEnabled(MARKER); +- } +- +- @Override +- public boolean isTraceEnabled() { +- return logger.isTraceEnabled(MARKER); +- } +- +- @Override +- public boolean isWarnEnabled() { +- return logger.isWarnEnabled(MARKER); +- } +- +- @Override +- public void trace(final Object message) { +- logger.trace(MARKER, String.valueOf(message)); +- } +- +- @Override +- public void trace(final Object message, final Throwable t) { +- logger.trace(MARKER, String.valueOf(message), t); +- } +- +- @Override +- public void warn(final Object message) { +- logger.warn(MARKER, String.valueOf(message)); +- } +- +- @Override +- public void warn(final Object message, final Throwable t) { +- logger.warn(MARKER, String.valueOf(message), t); +- } +- } +- +- private static final Object[] EMPTY_OBJECT_ARRAY = {}; +- +- private static final String[] EMPTY_STRING_ARRAY = {}; +- +- /** +- * Marker used by all messages coming from Apache Commons Logging. +- */ +- private static final Marker MARKER = MarkerFactory.getMarker("COMMONS-LOGGING"); +- +- /** +- * Caches Log instances. +- *

+- * The SLF4J reference implementation (Logback) has a single logger context, so each call to +- * {@link #getInstance(String)} +- * should give the same result. +- *

+- */ +- private final ConcurrentMap loggers = new ConcurrentHashMap<>(); +- +- private final ConcurrentMap attributes = new ConcurrentHashMap<>(); +- +- /** +- * Constructs a new instance. +- */ +- public Slf4jLogFactory() { +- // empty +- } +- +- @Override +- public Object getAttribute(final String name) { +- return attributes.get(name); +- } +- +- @Override +- public String[] getAttributeNames() { +- return attributes.keySet().toArray(EMPTY_STRING_ARRAY); +- } +- +- @Override +- public Log getInstance(final Class clazz) throws LogConfigurationException { +- return getInstance(clazz.getName()); +- } +- +- @Override +- public Log getInstance(final String name) { +- return loggers.computeIfAbsent(name, n -> { +- final Logger logger = LoggerFactory.getLogger(n); +- return logger instanceof LocationAwareLogger ? new Slf4jLocationAwareLog((LocationAwareLogger) logger) : new Slf4jLog( +- logger); +- }); +- } +- +- /** +- * This method is supposed to clear all loggers. +- *

+- * In this implementation it calls a "stop" method if the logger factory supports it. This is the case of +- * Logback. +- *

+- */ +- @Override +- public void release() { +- final ILoggerFactory factory = LoggerFactory.getILoggerFactory(); +- try { +- factory.getClass().getMethod("stop").invoke(factory); +- } catch (final ReflectiveOperationException ignored) { +- // empty +- } +- } +- +- @Override +- public void removeAttribute(final String name) { +- attributes.remove(name); +- } +- +- @Override +- public void setAttribute(final String name, final Object value) { +- if (value != null) { +- attributes.put(name, value); +- } else { +- removeAttribute(name); +- } +- } +-} diff --git a/commons-logging-1.3.3-src.tar.gz b/commons-logging-1.3.3-src.tar.gz new file mode 100644 index 0000000..41be54a --- /dev/null +++ b/commons-logging-1.3.3-src.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:21e8445d9fc6f0d5e45f67b059808bd3b90bf07b7ad658fd1b3e597acd7f44ee +size 194860 diff --git a/commons-logging-1.3.3-src.tar.gz.asc b/commons-logging-1.3.3-src.tar.gz.asc new file mode 100644 index 0000000..408bf6d --- /dev/null +++ b/commons-logging-1.3.3-src.tar.gz.asc @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- + +iQEzBAABCgAdFiEELbTx7w+nYezE6pNchv3H4qESYssFAmaBqTIACgkQhv3H4qES +YstuPQf/Za1DHg/M/4Jp51+47XXmNix01mBikDFNe9kviyDhJNKE/jAePtRMuYAB +trazgtgupfuBOfdgh9ILve0ZFpBqWw7oEoUgGvKF6FBNlsEVXmQIUPVNV2RX6cdh +mxFSeSKhlmZ6vkeCbicxlVNYHA/4nUivgwpZQM7FNWhDzv4BgupSNN0BC1nQMaPu +nSExYvzfOWsaHsawhi+FP949B39cSezdUTFA3Rc0JEusXYNhbrnfhCBv8lfaH8xn +S7nEGGjFH1GMZvGOPJEbdzllx6M0ugaEpf+lX/zAREc0zXt8PmP9rZTzvixW2kNw +WwqBEWF0Udbv3dlPwOaO1/53va7ukA== +=XlNv +-----END PGP SIGNATURE----- diff --git a/commons-logging-build.properties b/commons-logging-build.properties new file mode 100644 index 0000000..3f8ce6c --- /dev/null +++ b/commons-logging-build.properties @@ -0,0 +1,180 @@ +animal-sniffer.signature=java18 +assembly.tarLongFileMode=posix +changes.announcementDirectory=. +changes.announcementFile=RELEASE-NOTES.txt +commons.animal-sniffer.signature.version=1.0 +commons.animal-sniffer.version=1.23 +commons.assembly-plugin.version=3.7.1 +commons.bc.version=1.3.2 +commons.binary.suffix=-bin +commons.biz.aQute.bndlib.version=6.4.1 +commons.build-helper.version=3.6.0 +commons.build-plugin.version=1.14.0 +commons.buildnumber-plugin.version=3.2.0 +commons.changes.maxEntries=100 +commons.changes.onlyCurrentVersion=false +commons.changes.runOnlyAtExecutionRoot=false +commons.changes.version=2.12.1 +commons.checkstyle-plugin.version=3.4.0 +commons.checkstyle.version=10.17.0 +commons.cobertura.version=2.7 +commons.compiler.compilerVersion= +commons.compiler.fork=false +commons.compiler.javac= +commons.compiler.javadoc= +commons.compiler.release=8 +commons.compiler.version=3.13.0 +commons.componentid=logging +commons.conf.dir=src/conf +commons.cyclonedx.version=2.8.0 +commons.deployment.protocol=scp +commons.distSvnStagingUrl=scm\:svn\:https\://dist.apache.org/repos/dist/dev/commons/logging +commons.docEncoding=iso-8859-1 +commons.encoding=iso-8859-1 +commons.failsafe.version=3.2.1 +commons.felix.version=5.1.9 +commons.jacoco.branchRatio=0.34 +commons.jacoco.classRatio=0.42 +commons.jacoco.complexityRatio=0.42 +commons.jacoco.haltOnFailure=true +commons.jacoco.instructionRatio=0.52 +commons.jacoco.lineRatio=0.44 +commons.jacoco.methodRatio=0.61 +commons.jacoco.version=0.8.12 +commons.japicmp.breakBuildOnBinaryIncompatibleModifications=true +commons.japicmp.breakBuildOnSourceIncompatibleModifications=false +commons.japicmp.ignoreMissingClasses=false +commons.japicmp.version=0.21.2 +commons.jar-plugin.version=3.4.1 +commons.javadoc.java.link=https\://docs.oracle.com/en/java/javase/21/docs/api/ +commons.javadoc.javaee.link=https\://docs.oracle.com/javaee/6/api/ +commons.javadoc.javaee10.link=https\://jakarta.ee/specifications/platform/10/apidocs/ +commons.javadoc.javaee5.link=https\://docs.oracle.com/javaee/5/api/ +commons.javadoc.javaee6.link=https\://docs.oracle.com/javaee/6/api/ +commons.javadoc.javaee7.link=https\://docs.oracle.com/javaee/7/api/ +commons.javadoc.javaee8.link=https\://jakarta.ee/specifications/platform/8/apidocs/ +commons.javadoc.javaee9.1.link=https\://jakarta.ee/specifications/platform/9.1/apidocs/ +commons.javadoc.javaee9.link=https\://jakarta.ee/specifications/platform/9/apidocs/ +commons.javadoc.version=3.7.0 +commons.jira.id=LOGGING +commons.jira.pid=12310484 +commons.jmh.version=1.37 +commons.junit.version=5.11.0-M2 +commons.jxr.version=3.4.0 +commons.logging.javaversion=1.8 +commons.moditect-maven-plugin.addServiceUses=true +commons.moditect-maven-plugin.version=1.2.1.Final +commons.module.name=org.apache.commons.logging +commons.osgi.dynamicImport= +commons.osgi.excludeDependencies=true +commons.osgi.export=org.apache.commons.*;version\=1.3.3;-noimport\:\=true +commons.osgi.import=javax.servlet;version\="[2.1.0, 5.0.0)";resolution\:\=optional,\n org.apache.avalon.framework.logger;version\="[4.1.3, 4.1.5]";resolution\:\=optional,\n org.apache.log;version\="[1.0.1, 1.0.1]";resolution\:\=optional,\n org.apache.log4j;version\="[1.2.15, 2.0.0)";resolution\:\=optional,\n org.apache.logging.log4j;version\="[2.0, 4.0)";resolution\:\=optional,\n org.apache.logging.log4j.spi;version\="[2.0, 4.0)";resolution\:\=optional,\n org.apache.logging.log4j.util;version\="[2.0, 4.0)";resolution\:\=optional,\n org.slf4j;version\="[1.7, 3)";resolution\:\=optional,\n org.slf4j.spi;version\="[1.7, 3)";resolution\:\=optional +commons.osgi.private= +commons.osgi.symbolicName=org.apache.commons.commons-logging +commons.packageId=commons-logging +commons.pmd-impl.version=7.2.0 +commons.pmd.version=3.22.0 +commons.project-info.version=3.5.0 +commons.rat.version=0.16.1 +commons.rc.version=RC1 +commons.release-plugin.version=1.8.2 +commons.release.2.binary.suffix=-bin +commons.release.2.desc= +commons.release.2.name=commons-logging-${commons.release.2.version} +commons.release.3.binary.suffix=-bin +commons.release.3.desc= +commons.release.3.name=commons-logging-${commons.release.3.version} +commons.release.4.binary.suffix=-bin +commons.release.4.desc= +commons.release.desc= +commons.release.isDistModule=true +commons.release.name=commons-logging-1.3.3 +commons.release.next=1.3.4 +commons.release.version=1.3.3 +commons.scm-publish.version=1.1 +commons.scmPubServer=commons.site +commons.scmPubUrl=https\://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-logging +commons.site-plugin.version=3.12.1 +commons.site.path=logging +commons.spdx.version=0.7.3 +commons.spotbugs.impl.version=4.8.5 +commons.spotbugs.plugin.version=4.8.5.0 +commons.surefire-report.aggregate=false +commons.surefire-report.version=3.2.5 +commons.surefire.version=3.2.5 +commons.wagon-ssh.version=3.5.3 +distMgmtReleasesId=apache.releases.https +distMgmtReleasesName=Apache Release Distribution Repository +distMgmtReleasesUrl=https\://repository.apache.org/service/local/staging/deploy/maven2 +distMgmtSnapshotsId=apache.snapshots.https +distMgmtSnapshotsName=Apache Development Snapshot Repository +distMgmtSnapshotsUrl=https\://repository.apache.org/content/repositories/snapshots +failsafe.runorder=filesystem +findsecbugs.version=1.13.0 +gpg.useagent=true +log4j2.version=2.23.1 +logback.version=1.3.14 +maven.build.dir=target +maven.build.finalName=commons-logging-1.3.3 +maven.build.outputDir=${maven.build.dir}/classes +maven.build.resourceDir.0=src/main/resources +maven.build.resourceDir.1=. +maven.build.srcDir.0=src/main/java +maven.build.testDir.0=src/test/java +maven.build.testOutputDir=${maven.build.dir}/test-classes +maven.build.testResourceDir.0=src/test/resources +maven.build.testResourceDir.1=. +maven.compiler.release=8 +maven.compiler.source=1.8 +maven.compiler.target=1.8 +maven.repo.local=${user.home}/.m2/repository +maven.reporting.outputDirectory=${maven.build.dir}/site +maven.settings.interactiveMode=true +maven.settings.offline=false +maven.test.reports=${maven.build.dir}/test-reports +minSeverity=info +minimalJavaBuildVersion=8 +minimalMavenBuildVersion=3.6.3 +moditect.java.version=9 +organization.logo=https\://www.apache.org/images/asf_logo_wide_2016.png +project.build.directory=${maven.build.dir} +project.build.outputDirectory=${maven.build.outputDir} +project.build.outputTimestamp=2024-06-30T18\:08\:54Z +project.build.sourceEncoding=iso-8859-1 +project.reporting.outputEncoding=iso-8859-1 +skipSurefireReport=true +slf4j.version=2.0.13 +sonar.host.url=https\://analysis.apache.org/ +sourceReleaseAssemblyDescriptor=source-release +surefire.version=3.2.5 +version.apache-rat-plugin=0.16.1 +version.apache-resource-bundles=1.5 +version.checksum-maven-plugin=1.11 +version.maven-antrun-plugin=3.1.0 +version.maven-assembly-plugin=3.7.1 +version.maven-checkstyle-plugin=3.3.1 +version.maven-clean-plugin=3.3.2 +version.maven-compiler-plugin=3.13.0 +version.maven-dependency-plugin=3.6.1 +version.maven-deploy-plugin=3.1.1 +version.maven-ear-plugin=3.3.0 +version.maven-enforcer-plugin=3.4.1 +version.maven-fluido-skin=1.11.2 +version.maven-gpg-plugin=3.2.3 +version.maven-help-plugin=3.4.0 +version.maven-install-plugin=3.1.1 +version.maven-invoker-plugin=3.6.1 +version.maven-jar-plugin=3.4.0 +version.maven-javadoc-plugin=3.6.3 +version.maven-plugin-tools=3.12.0 +version.maven-project-info-reports-plugin=3.5.0 +version.maven-release-plugin=3.0.1 +version.maven-remote-resources-plugin=3.2.0 +version.maven-resources-plugin=3.3.1 +version.maven-scm-plugin=2.0.1 +version.maven-scm-publish-plugin=3.2.1 +version.maven-shade-plugin=3.5.2 +version.maven-site-plugin=3.12.1 +version.maven-source-plugin=3.2.1 +version.maven-surefire=3.2.5 +version.maven-war-plugin=3.4.0 diff --git a/commons-logging-build.xml b/commons-logging-build.xml new file mode 100644 index 0000000..2ec71cc --- /dev/null +++ b/commons-logging-build.xml @@ -0,0 +1,738 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/commons-logging-manifests.patch b/commons-logging-manifests.patch deleted file mode 100644 index a7bda17..0000000 --- a/commons-logging-manifests.patch +++ /dev/null @@ -1,73 +0,0 @@ ---- commons-logging-1.2-src/build.xml 2014-07-05 20:11:36.000000000 +0200 -+++ commons-logging-1.2-src/build.xml 2019-01-28 13:41:46.362796232 +0100 -@@ -263,9 +263,31 @@ - description="Copy static files to build directory"> - - -- - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - - - -+ manifest="${build.home}/conf/api/MANIFEST.MF"> - - - -@@ -492,7 +514,7 @@ - - -+ manifest="${build.home}/conf/adapters/MANIFEST.MF"> - - - -@@ -594,7 +616,7 @@ - - -+ manifest="${build.home}/conf/tests/MANIFEST.MF"> - - ---- commons-logging-1.2-src/src/conf/MANIFEST.MF 2014-07-05 20:11:36.000000000 +0200 -+++ commons-logging-1.2-src/src/conf/MANIFEST.MF 2019-01-28 13:37:10.333359706 +0100 -@@ -6,7 +6,7 @@ - Implementation-Vendor-Id: org.apache - Specification-Title: Commons Logging - Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt --Bundle-SymbolicName: org.apache.commons.logging -+Bundle-SymbolicName: org.apache.commons.logging@bsn-extension@ - X-Compile-Target-JDK: 1.2 - Implementation-Version: 1.2 - Specification-Vendor: The Apache Software Foundation diff --git a/no-tests.patch b/no-tests.patch deleted file mode 100644 index 985c44e..0000000 --- a/no-tests.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- commons-logging-1.2-src/build.xml 2014-07-05 20:11:36.000000000 +0200 -+++ commons-logging-1.2-src/build.xml 2021-03-24 10:17:33.609764305 +0100 -@@ -613,7 +613,7 @@ - - - -- - -