From dfa15ef4690f2985ca442a6c3c585b63fbf89823 Mon Sep 17 00:00:00 2001 From: George Gastaldi Date: Thu, 26 Sep 2019 13:25:49 -0300 Subject: [PATCH] Ban commons-logging, log4j and slf4j implementations from build Fixes #294 --- bom/runtime/pom.xml | 36 +++++-------------- build-parent/pom.xml | 15 ++++++++ devtools/maven/pom.xml | 11 ++++++ .../amazon-lambda-resteasy/runtime/pom.xml | 11 +++++- .../core/deployment/ArtemisCoreProcessor.java | 5 --- extensions/artemis-core/runtime/pom.xml | 11 ++++++ .../ElasticsearchRestClientProcessor.java | 8 +---- .../elasticsearch-rest-client/runtime/pom.xml | 16 +++++++++ .../deployment/RestClientProcessor.java | 4 --- extensions/rest-client/runtime/pom.xml | 10 ++++++ .../smallrye-fault-tolerance/runtime/pom.xml | 10 ++++++ integration-tests/artemis-core/pom.xml | 9 +++++ integration-tests/artemis-jms/pom.xml | 9 +++++ integration-tests/infinispan-client/pom.xml | 11 ++++++ tcks/microprofile-health/pom.xml | 8 +++++ tcks/microprofile-openapi/pom.xml | 10 ++++++ test-framework/common/pom.xml | 5 +++ 17 files changed, 144 insertions(+), 45 deletions(-) diff --git a/bom/runtime/pom.xml b/bom/runtime/pom.xml index cb72b10fb197a..c2a54affcdcb2 100644 --- a/bom/runtime/pom.xml +++ b/bom/runtime/pom.xml @@ -69,7 +69,6 @@ 19.2.0.1 1.0.0.Alpha8 2.9.10 - 1.2 1.0.0.Final 3.8.1 1.11 @@ -89,8 +88,6 @@ 2.2.9 1.0.6.Final 2.1.0.Final - 1.2.17 - 2.11.2 1.7.25 1.2.0.Final 1.5.0.Final-format-001 @@ -725,11 +722,6 @@ - - commons-logging - commons-logging - ${commons-logging.version} - org.apache.commons commons-lang3 @@ -872,6 +864,10 @@ com.sun.xml.bind jaxb-osgi + + commons-logging + commons-logging + @@ -893,6 +889,10 @@ com.sun.xml.bind jaxb-osgi + + commons-logging + commons-logging + @@ -1130,11 +1130,6 @@ javax.ws.rs-api ${javax.ws.rs-api.version} - - log4j - log4j - ${log4j.version} - org.apache.activemq artemis-core-client @@ -1180,21 +1175,6 @@ zookeeper ${zookeeper.version} - - org.apache.logging.log4j - log4j-api - ${log4j2.version} - - - org.apache.logging.log4j - log4j-core - ${log4j2.version} - - - org.apache.logging.log4j - log4j-slf4j-impl - ${log4j2.version} - org.apache.maven maven-plugin-api diff --git a/build-parent/pom.xml b/build-parent/pom.xml index 8c4d9f1295a78..fb05604f51741 100644 --- a/build-parent/pom.xml +++ b/build-parent/pom.xml @@ -183,6 +183,21 @@ jakarta.json:jakarta.json-api io.netty:netty-all + + log4j:log4j + org.apache.logging.log4j:log4j-api + org.apache.logging.log4j:log4j-core + org.apache.logging.log4j:log4j-slf4j-impl + + commons-logging:commons-logging + commons-logging:commons-logging-api + org.springframework:spring-jcl + + org.slf4j:slf4j-simple + org.slf4j:slf4j-nop + org.slf4j:slf4j-jdk14 + org.slf4j:slf4j-log4j12 + org.slf4j:slf4j-log4j13 diff --git a/devtools/maven/pom.xml b/devtools/maven/pom.xml index 1eeeb868ddb7d..55672330251e1 100644 --- a/devtools/maven/pom.xml +++ b/devtools/maven/pom.xml @@ -111,6 +111,17 @@ org.twdata.maven mojo-executor 2.3.0 + + + org.slf4j + slf4j-simple + + + + + + org.jboss.slf4j + slf4j-jboss-logging diff --git a/extensions/amazon-lambda-resteasy/runtime/pom.xml b/extensions/amazon-lambda-resteasy/runtime/pom.xml index 335481ad82ae2..c502860e3b47b 100644 --- a/extensions/amazon-lambda-resteasy/runtime/pom.xml +++ b/extensions/amazon-lambda-resteasy/runtime/pom.xml @@ -25,8 +25,17 @@ com.amazonaws.serverless aws-serverless-java-container-core + + + commons-logging + commons-logging + + + + + org.jboss.logging + commons-logging-jboss-logging - org.junit.jupiter junit-jupiter diff --git a/extensions/artemis-core/deployment/src/main/java/io/quarkus/artemis/core/deployment/ArtemisCoreProcessor.java b/extensions/artemis-core/deployment/src/main/java/io/quarkus/artemis/core/deployment/ArtemisCoreProcessor.java index 4715c4bb72e8b..0f0160254171c 100644 --- a/extensions/artemis-core/deployment/src/main/java/io/quarkus/artemis/core/deployment/ArtemisCoreProcessor.java +++ b/extensions/artemis-core/deployment/src/main/java/io/quarkus/artemis/core/deployment/ArtemisCoreProcessor.java @@ -10,8 +10,6 @@ import org.apache.activemq.artemis.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy; import org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory; import org.apache.activemq.artemis.spi.core.remoting.ConnectorFactory; -import org.apache.commons.logging.impl.Jdk14Logger; -import org.apache.commons.logging.impl.LogFactoryImpl; import org.jboss.jandex.ClassInfo; import org.jboss.jandex.DotName; import org.jboss.logging.Logger; @@ -48,9 +46,6 @@ public class ArtemisCoreProcessor { void build(CombinedIndexBuildItem indexBuildItem, BuildProducer reflectiveClass) { - reflectiveClass.produce(new ReflectiveClassBuildItem(false, false, - LogFactoryImpl.class.getName(), Jdk14Logger.class.getName())); - Collection connectorFactories = indexBuildItem.getIndex() .getAllKnownImplementors(DotName.createSimple(ConnectorFactory.class.getName())); diff --git a/extensions/artemis-core/runtime/pom.xml b/extensions/artemis-core/runtime/pom.xml index cdf0130ac4ac4..00e8ac779a866 100644 --- a/extensions/artemis-core/runtime/pom.xml +++ b/extensions/artemis-core/runtime/pom.xml @@ -31,6 +31,17 @@ org.apache.activemq artemis-core-client + + + commons-logging + commons-logging + + + + + + org.jboss.logging + commons-logging-jboss-logging diff --git a/extensions/elasticsearch-rest-client/deployment/src/main/java/io/quarkus/elasticsearch/restclient/deployment/ElasticsearchRestClientProcessor.java b/extensions/elasticsearch-rest-client/deployment/src/main/java/io/quarkus/elasticsearch/restclient/deployment/ElasticsearchRestClientProcessor.java index 7b8c1fbcfc222..6d5e2f9eb736d 100644 --- a/extensions/elasticsearch-rest-client/deployment/src/main/java/io/quarkus/elasticsearch/restclient/deployment/ElasticsearchRestClientProcessor.java +++ b/extensions/elasticsearch-rest-client/deployment/src/main/java/io/quarkus/elasticsearch/restclient/deployment/ElasticsearchRestClientProcessor.java @@ -4,17 +4,11 @@ import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem; import io.quarkus.deployment.builditem.FeatureBuildItem; -import io.quarkus.deployment.builditem.substrate.ReflectiveClassBuildItem; class ElasticsearchRestClientProcessor { @BuildStep - public void build(BuildProducer reflectiveClass, - BuildProducer extensionSslNativeSupport) throws Exception { - reflectiveClass.produce(new ReflectiveClassBuildItem(false, false, - org.apache.commons.logging.impl.LogFactoryImpl.class.getName(), - org.apache.commons.logging.impl.Jdk14Logger.class.getName())); - + public void build(BuildProducer extensionSslNativeSupport) { // Indicates that this extension would like the SSL support to be enabled extensionSslNativeSupport.produce(new ExtensionSslNativeSupportBuildItem(FeatureBuildItem.ELASTICSEARCH_REST_CLIENT)); } diff --git a/extensions/elasticsearch-rest-client/runtime/pom.xml b/extensions/elasticsearch-rest-client/runtime/pom.xml index 280f505567e3f..cdca3b199c94c 100644 --- a/extensions/elasticsearch-rest-client/runtime/pom.xml +++ b/extensions/elasticsearch-rest-client/runtime/pom.xml @@ -21,10 +21,26 @@ org.elasticsearch.client elasticsearch-rest-client + + + commons-logging + commons-logging + + + + + org.jboss.logging + commons-logging-jboss-logging org.elasticsearch.client elasticsearch-rest-client-sniffer + + + commons-logging + commons-logging + + com.oracle.substratevm diff --git a/extensions/rest-client/deployment/src/main/java/io/quarkus/restclient/deployment/RestClientProcessor.java b/extensions/rest-client/deployment/src/main/java/io/quarkus/restclient/deployment/RestClientProcessor.java index 996c738d634d0..3e049059be716 100644 --- a/extensions/rest-client/deployment/src/main/java/io/quarkus/restclient/deployment/RestClientProcessor.java +++ b/extensions/rest-client/deployment/src/main/java/io/quarkus/restclient/deployment/RestClientProcessor.java @@ -16,8 +16,6 @@ import javax.ws.rs.client.ClientResponseFilter; import javax.ws.rs.ext.Providers; -import org.apache.commons.logging.impl.Jdk14Logger; -import org.apache.commons.logging.impl.LogFactoryImpl; import org.eclipse.microprofile.config.Config; import org.eclipse.microprofile.config.ConfigProvider; import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; @@ -110,8 +108,6 @@ void setup(BuildProducer feature, additionalBeans.produce(new AdditionalBeanBuildItem(RestClient.class)); reflectiveClass.produce(new ReflectiveClassBuildItem(false, false, - LogFactoryImpl.class.getName(), - Jdk14Logger.class.getName(), DefaultResponseExceptionMapper.class.getName(), AsyncInterceptorRxInvokerProvider.class.getName(), ResteasyProviderFactoryImpl.class.getName(), diff --git a/extensions/rest-client/runtime/pom.xml b/extensions/rest-client/runtime/pom.xml index 167b527314095..841a9e53ca550 100644 --- a/extensions/rest-client/runtime/pom.xml +++ b/extensions/rest-client/runtime/pom.xml @@ -33,6 +33,16 @@ org.apache.httpcomponents httpasyncclient + + + commons-logging + commons-logging + + + + + org.jboss.logging + commons-logging-jboss-logging com.oracle.substratevm diff --git a/extensions/smallrye-fault-tolerance/runtime/pom.xml b/extensions/smallrye-fault-tolerance/runtime/pom.xml index 13cb771475efb..54b7af66644b7 100644 --- a/extensions/smallrye-fault-tolerance/runtime/pom.xml +++ b/extensions/smallrye-fault-tolerance/runtime/pom.xml @@ -28,8 +28,18 @@ org.eclipse.microprofile.metrics microprofile-metrics-api + + commons-logging + commons-logging + + + + org.jboss.logging + commons-logging-jboss-logging + + io.quarkus quarkus-smallrye-metrics diff --git a/integration-tests/artemis-core/pom.xml b/integration-tests/artemis-core/pom.xml index 73ae6f0f36825..61b9c1da659ff 100644 --- a/integration-tests/artemis-core/pom.xml +++ b/integration-tests/artemis-core/pom.xml @@ -51,8 +51,17 @@ org.jboss.logmanager jboss-logmanager + + commons-logging + commons-logging + + + org.jboss.logging + commons-logging-jboss-logging + test + diff --git a/integration-tests/artemis-jms/pom.xml b/integration-tests/artemis-jms/pom.xml index a8787540399d7..05b995f4af173 100644 --- a/integration-tests/artemis-jms/pom.xml +++ b/integration-tests/artemis-jms/pom.xml @@ -51,8 +51,17 @@ org.jboss.logmanager jboss-logmanager + + commons-logging + commons-logging + + + org.jboss.logging + commons-logging-jboss-logging + test + diff --git a/integration-tests/infinispan-client/pom.xml b/integration-tests/infinispan-client/pom.xml index d2ca202339c97..839dfbb24815e 100644 --- a/integration-tests/infinispan-client/pom.xml +++ b/integration-tests/infinispan-client/pom.xml @@ -51,6 +51,17 @@ org.infinispan infinispan-remote-query-server + + + commons-logging + commons-logging + + + test + + + org.jboss.logging + commons-logging-jboss-logging test diff --git a/tcks/microprofile-health/pom.xml b/tcks/microprofile-health/pom.xml index fd81328505eb3..2539b9ca47507 100644 --- a/tcks/microprofile-health/pom.xml +++ b/tcks/microprofile-health/pom.xml @@ -49,8 +49,16 @@ javax.json javax.json-api + + commons-logging + commons-logging + + + org.jboss.logging + commons-logging-jboss-logging + diff --git a/tcks/microprofile-openapi/pom.xml b/tcks/microprofile-openapi/pom.xml index 957eb721dd6f5..f000ddadbb2c5 100644 --- a/tcks/microprofile-openapi/pom.xml +++ b/tcks/microprofile-openapi/pom.xml @@ -54,6 +54,16 @@ org.eclipse.microprofile.openapi microprofile-openapi-tck ${microprofile-open-api.version} + + + commons-logging + commons-logging + + + + + org.jboss.logging + commons-logging-jboss-logging diff --git a/test-framework/common/pom.xml b/test-framework/common/pom.xml index 207a3b005a8fe..61da99ff3c822 100644 --- a/test-framework/common/pom.xml +++ b/test-framework/common/pom.xml @@ -27,6 +27,11 @@ org.jboss jandex + + + org.jboss.logging + commons-logging-jboss-logging + org.junit.jupiter junit-jupiter