From 26bdf59cbbe6fcd36747149a21736864a29266e4 Mon Sep 17 00:00:00 2001 From: Lari Hotari Date: Mon, 22 Mar 2021 21:13:56 +0200 Subject: [PATCH] Fix shading for ahc-default.properties file (#10007) --- pulsar-broker-shaded/pom.xml | 48 ++++++++++++ pulsar-client-admin-shaded/pom.xml | 48 ++++++++++++ .../config/ahc-default.properties | 77 ------------------- .../org/asynchttpclient/config/ahc.properties | 1 - pulsar-client-all/pom.xml | 30 ++++++++ pulsar-client-shaded/pom.xml | 31 ++++++-- .../src/main/resources/ahc.properties | 76 ------------------ pulsar-functions/localrun-shaded/pom.xml | 48 ++++++++++++ 8 files changed, 200 insertions(+), 159 deletions(-) delete mode 100644 pulsar-client-admin/src/main/resources/org/asynchttpclient/config/ahc-default.properties delete mode 120000 pulsar-client-admin/src/main/resources/org/asynchttpclient/config/ahc.properties delete mode 100644 pulsar-client/src/main/resources/ahc.properties diff --git a/pulsar-broker-shaded/pom.xml b/pulsar-broker-shaded/pom.xml index 753dea3873e41..94f30a737150e 100644 --- a/pulsar-broker-shaded/pom.xml +++ b/pulsar-broker-shaded/pom.xml @@ -44,6 +44,54 @@ + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + prepare-package + + unpack + + + + + org.asynchttpclient + async-http-client + ${asynchttpclient.version} + jar + true + org/asynchttpclient/config/ahc-default.properties + ${project.build.directory}/classes + + + + + + + + + maven-antrun-plugin + + + shade-ahc-properties + prepare-package + + run + + + + + + + + + + + org.apache.maven.plugins maven-shade-plugin diff --git a/pulsar-client-admin-shaded/pom.xml b/pulsar-client-admin-shaded/pom.xml index dbaadab9e7c28..57875e6609918 100644 --- a/pulsar-client-admin-shaded/pom.xml +++ b/pulsar-client-admin-shaded/pom.xml @@ -48,6 +48,54 @@ + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + prepare-package + + unpack + + + + + org.asynchttpclient + async-http-client + ${asynchttpclient.version} + jar + true + org/asynchttpclient/config/ahc-default.properties + ${project.build.directory}/classes + + + + + + + + + maven-antrun-plugin + + + shade-ahc-properties + prepare-package + + run + + + + + + + + + + + org.apache.maven.plugins maven-shade-plugin diff --git a/pulsar-client-admin/src/main/resources/org/asynchttpclient/config/ahc-default.properties b/pulsar-client-admin/src/main/resources/org/asynchttpclient/config/ahc-default.properties deleted file mode 100644 index 0396933c6bcdb..0000000000000 --- a/pulsar-client-admin/src/main/resources/org/asynchttpclient/config/ahc-default.properties +++ /dev/null @@ -1,77 +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. -# - -# This file is used by the shaded asynchttpclient packaged in pulsar-client-${VERSION}-shaded.jar. -# For more details please refer https://github.com/apache/pulsar/issues/389 - -org.asynchttpclient.threadPoolName=AsyncHttpClient -org.asynchttpclient.maxConnections=-1 -org.asynchttpclient.maxConnectionsPerHost=-1 -org.asynchttpclient.connectTimeout=5000 -org.asynchttpclient.pooledConnectionIdleTimeout=60000 -org.asynchttpclient.connectionPoolCleanerPeriod=1000 -org.asynchttpclient.readTimeout=60000 -org.asynchttpclient.requestTimeout=60000 -org.asynchttpclient.connectionTtl=-1 -org.asynchttpclient.followRedirect=false -org.asynchttpclient.maxRedirects=5 -org.asynchttpclient.compressionEnforced=false -org.asynchttpclient.userAgent=AHC/2.1 -org.asynchttpclient.enabledProtocols=TLSv1.2, TLSv1.1, TLSv1 -org.asynchttpclient.enabledCipherSuites= -org.asynchttpclient.useProxySelector=false -org.asynchttpclient.useProxyProperties=false -org.asynchttpclient.validateResponseHeaders=true -org.asynchttpclient.aggregateWebSocketFrameFragments=true -org.asynchttpclient.strict302Handling=false -org.asynchttpclient.keepAlive=true -org.asynchttpclient.maxRequestRetry=5 -org.asynchttpclient.disableUrlEncodingForBoundRequests=false -org.asynchttpclient.useLaxCookieEncoder=false -org.asynchttpclient.removeQueryParamOnRedirect=true -org.asynchttpclient.useOpenSsl=false -org.asynchttpclient.useInsecureTrustManager=false -org.asynchttpclient.disableHttpsEndpointIdentificationAlgorithm=false -org.asynchttpclient.sslSessionCacheSize=0 -org.asynchttpclient.sslSessionTimeout=0 -org.asynchttpclient.tcpNoDelay=true -org.asynchttpclient.soReuseAddress=false -org.asynchttpclient.soLinger=-1 -org.asynchttpclient.soSndBuf=-1 -org.asynchttpclient.soRcvBuf=-1 -org.asynchttpclient.httpClientCodecMaxInitialLineLength=4096 -org.asynchttpclient.httpClientCodecMaxHeaderSize=8192 -org.asynchttpclient.httpClientCodecMaxChunkSize=8192 -org.asynchttpclient.httpClientCodecInitialBufferSize=128 -org.asynchttpclient.disableZeroCopy=false -org.asynchttpclient.handshakeTimeout=10000 -org.asynchttpclient.chunkedFileChunkSize=8192 -org.asynchttpclient.webSocketMaxBufferSize=128000000 -org.asynchttpclient.webSocketMaxFrameSize=10240 -org.asynchttpclient.keepEncodingHeader=false -org.asynchttpclient.shutdownQuietPeriod=2000 -org.asynchttpclient.shutdownTimeout=15000 -org.asynchttpclient.useNativeTransport=false -org.asynchttpclient.ioThreadsCount=0 -org.asynchttpclient.acquireFreeChannelTimeout=0 -org.asynchttpclient.enableWebSocketCompression=true -org.asynchttpclient.expiredCookieEvictionDelay=30000 -org.asynchttpclient.hashedWheelTimerTickDuration=100 -org.asynchttpclient.hashedWheelTimerSize=512 - diff --git a/pulsar-client-admin/src/main/resources/org/asynchttpclient/config/ahc.properties b/pulsar-client-admin/src/main/resources/org/asynchttpclient/config/ahc.properties deleted file mode 120000 index eac6e7e31e373..0000000000000 --- a/pulsar-client-admin/src/main/resources/org/asynchttpclient/config/ahc.properties +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../pulsar-client/src/main/resources/ahc.properties \ No newline at end of file diff --git a/pulsar-client-all/pom.xml b/pulsar-client-all/pom.xml index df27722050ee9..7d53dbfdc961b 100644 --- a/pulsar-client-all/pom.xml +++ b/pulsar-client-all/pom.xml @@ -75,12 +75,42 @@ **/ProtobufSchema.class ${project.build.directory}/classes + + org.asynchttpclient + async-http-client + ${asynchttpclient.version} + jar + true + org/asynchttpclient/config/ahc-default.properties + ${project.build.directory}/classes + + + maven-antrun-plugin + + + shade-ahc-properties + prepare-package + + run + + + + + + + + + + + org.apache.maven.plugins diff --git a/pulsar-client-shaded/pom.xml b/pulsar-client-shaded/pom.xml index 923835a0fefc5..14399984f9f58 100644 --- a/pulsar-client-shaded/pom.xml +++ b/pulsar-client-shaded/pom.xml @@ -71,13 +71,13 @@ ${project.build.directory}/classes - ${project.groupId} - pulsar-client-original - ${project.version} + org.asynchttpclient + async-http-client + ${asynchttpclient.version} jar true - **/ahc.properties - ${project.build.directory}/classes/org/asynchttpclient/config + org/asynchttpclient/config/ahc-default.properties + ${project.build.directory}/classes @@ -85,6 +85,27 @@ + + maven-antrun-plugin + + + shade-ahc-properties + prepare-package + + run + + + + + + + + + + + org.apache.maven.plugins diff --git a/pulsar-client/src/main/resources/ahc.properties b/pulsar-client/src/main/resources/ahc.properties deleted file mode 100644 index 71877cbf52415..0000000000000 --- a/pulsar-client/src/main/resources/ahc.properties +++ /dev/null @@ -1,76 +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. -# - -# This file is used by the shaded asynchttpclient packaged in pulsar-client-${VERSION}-shaded.jar. -# For more details please refer https://github.com/apache/pulsar/issues/389 - -org.apache.pulsar.shade.org.asynchttpclient.threadPoolName=AsyncHttpClient -org.apache.pulsar.shade.org.asynchttpclient.maxConnections=-1 -org.apache.pulsar.shade.org.asynchttpclient.maxConnectionsPerHost=-1 -org.apache.pulsar.shade.org.asynchttpclient.connectTimeout=5000 -org.apache.pulsar.shade.org.asynchttpclient.pooledConnectionIdleTimeout=60000 -org.apache.pulsar.shade.org.asynchttpclient.connectionPoolCleanerPeriod=1000 -org.apache.pulsar.shade.org.asynchttpclient.readTimeout=60000 -org.apache.pulsar.shade.org.asynchttpclient.requestTimeout=60000 -org.apache.pulsar.shade.org.asynchttpclient.connectionTtl=-1 -org.apache.pulsar.shade.org.asynchttpclient.followRedirect=false -org.apache.pulsar.shade.org.asynchttpclient.maxRedirects=5 -org.apache.pulsar.shade.org.asynchttpclient.compressionEnforced=false -org.apache.pulsar.shade.org.asynchttpclient.userAgent=AHC/2.1 -org.apache.pulsar.shade.org.asynchttpclient.enabledProtocols=TLSv1.2, TLSv1.1, TLSv1 -org.apache.pulsar.shade.org.asynchttpclient.enabledCipherSuites= -org.apache.pulsar.shade.org.asynchttpclient.useProxySelector=false -org.apache.pulsar.shade.org.asynchttpclient.useProxyProperties=false -org.apache.pulsar.shade.org.asynchttpclient.validateResponseHeaders=true -org.apache.pulsar.shade.org.asynchttpclient.aggregateWebSocketFrameFragments=true -org.apache.pulsar.shade.org.asynchttpclient.strict302Handling=false -org.apache.pulsar.shade.org.asynchttpclient.keepAlive=true -org.apache.pulsar.shade.org.asynchttpclient.maxRequestRetry=5 -org.apache.pulsar.shade.org.asynchttpclient.disableUrlEncodingForBoundRequests=false -org.apache.pulsar.shade.org.asynchttpclient.useLaxCookieEncoder=false -org.apache.pulsar.shade.org.asynchttpclient.removeQueryParamOnRedirect=true -org.apache.pulsar.shade.org.asynchttpclient.useOpenSsl=false -org.apache.pulsar.shade.org.asynchttpclient.useInsecureTrustManager=false -org.apache.pulsar.shade.org.asynchttpclient.disableHttpsEndpointIdentificationAlgorithm=false -org.apache.pulsar.shade.org.asynchttpclient.sslSessionCacheSize=0 -org.apache.pulsar.shade.org.asynchttpclient.sslSessionTimeout=0 -org.apache.pulsar.shade.org.asynchttpclient.tcpNoDelay=true -org.apache.pulsar.shade.org.asynchttpclient.soReuseAddress=false -org.apache.pulsar.shade.org.asynchttpclient.soLinger=-1 -org.apache.pulsar.shade.org.asynchttpclient.soSndBuf=-1 -org.apache.pulsar.shade.org.asynchttpclient.soRcvBuf=-1 -org.apache.pulsar.shade.org.asynchttpclient.httpClientCodecMaxInitialLineLength=4096 -org.apache.pulsar.shade.org.asynchttpclient.httpClientCodecMaxHeaderSize=8192 -org.apache.pulsar.shade.org.asynchttpclient.httpClientCodecMaxChunkSize=8192 -org.apache.pulsar.shade.org.asynchttpclient.httpClientCodecInitialBufferSize=128 -org.apache.pulsar.shade.org.asynchttpclient.disableZeroCopy=false -org.apache.pulsar.shade.org.asynchttpclient.handshakeTimeout=10000 -org.apache.pulsar.shade.org.asynchttpclient.chunkedFileChunkSize=8192 -org.apache.pulsar.shade.org.asynchttpclient.webSocketMaxBufferSize=128000000 -org.apache.pulsar.shade.org.asynchttpclient.webSocketMaxFrameSize=10240 -org.apache.pulsar.shade.org.asynchttpclient.keepEncodingHeader=false -org.apache.pulsar.shade.org.asynchttpclient.shutdownQuietPeriod=2000 -org.apache.pulsar.shade.org.asynchttpclient.shutdownTimeout=15000 -org.apache.pulsar.shade.org.asynchttpclient.useNativeTransport=false -org.apache.pulsar.shade.org.asynchttpclient.ioThreadsCount=0 -org.apache.pulsar.shade.org.asynchttpclient.acquireFreeChannelTimeout=0 -org.apache.pulsar.shade.org.org.asynchttpclient.enableWebSocketCompression=true -org.apache.pulsar.shade.org.asynchttpclient.expiredCookieEvictionDelay=30000 -org.apache.pulsar.shade.org.asynchttpclient.hashedWheelTimerTickDuration=100 -org.apache.pulsar.shade.org.asynchttpclient.hashedWheelTimerSize=512 diff --git a/pulsar-functions/localrun-shaded/pom.xml b/pulsar-functions/localrun-shaded/pom.xml index 6a15433898ef4..8ffe431a378e7 100644 --- a/pulsar-functions/localrun-shaded/pom.xml +++ b/pulsar-functions/localrun-shaded/pom.xml @@ -43,6 +43,54 @@ + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + prepare-package + + unpack + + + + + org.asynchttpclient + async-http-client + ${asynchttpclient.version} + jar + true + org/asynchttpclient/config/ahc-default.properties + ${project.build.directory}/classes + + + + + + + + + maven-antrun-plugin + + + shade-ahc-properties + prepare-package + + run + + + + + + + + + + + org.apache.maven.plugins maven-shade-plugin