Skip to content

Commit d257454

Browse files
committed
Make apache5.x as default client if in class path
1 parent 2f72282 commit d257454

File tree

12 files changed

+63
-4
lines changed

12 files changed

+63
-4
lines changed

core/aws-core/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,12 @@
191191
<version>${awsjavasdk.version}</version>
192192
<scope>test</scope>
193193
</dependency>
194+
<dependency>
195+
<groupId>software.amazon.awssdk</groupId>
196+
<artifactId>apache5-client</artifactId>
197+
<version>${awsjavasdk.version}</version>
198+
<scope>test</scope>
199+
</dependency>
194200
<dependency>
195201
<groupId>org.assertj</groupId>
196202
<artifactId>assertj-core</artifactId>

core/sdk-core/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@
112112
<version>${awsjavasdk.version}</version>
113113
<scope>test</scope>
114114
</dependency>
115+
<dependency>
116+
<groupId>software.amazon.awssdk</groupId>
117+
<artifactId>apache5-client</artifactId>
118+
<version>${awsjavasdk.version}</version>
119+
<scope>test</scope>
120+
</dependency>
115121
<dependency>
116122
<groupId>org.junit.jupiter</groupId>
117123
<artifactId>junit-jupiter</artifactId>

core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/http/loader/ClasspathSdkHttpServiceProvider.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ final class ClasspathSdkHttpServiceProvider<T> implements SdkHttpServiceProvider
3838

3939
static final Map<String, Integer> SYNC_HTTP_SERVICES_PRIORITY =
4040
ImmutableMap.<String, Integer>builder()
41-
.put("software.amazon.awssdk.http.apache.ApacheSdkHttpService", 1)
42-
.put("software.amazon.awssdk.http.urlconnection.UrlConnectionSdkHttpService", 2)
43-
.put("software.amazon.awssdk.http.crt.AwsCrtSdkHttpService", 3)
41+
.put("software.amazon.awssdk.http.apache5.Apache5SdkHttpService", 1)
42+
.put("software.amazon.awssdk.http.apache.ApacheSdkHttpService", 2)
43+
.put("software.amazon.awssdk.http.urlconnection.UrlConnectionSdkHttpService", 3)
44+
.put("software.amazon.awssdk.http.crt.AwsCrtSdkHttpService", 4)
4445
.build();
4546

4647
static final Map<String, Integer> ASYNC_HTTP_SERVICES_PRIORITY =

http-clients/apache5-client/src/main/java/software/amazon/awssdk/http/apache5/Apache5HttpClient.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ private ConnectionManagerAwareHttpClient createClient(Apache5HttpClient.DefaultB
166166
.setUserAgent("") // SDK will set the user agent header in the pipeline. Don't let Apache waste time
167167
.setConnectionManager(ClientConnectionManagerFactory.wrap(cm))
168168
//This is done to keep backward compatibility with Apache 4.x
169-
.disableRedirectHandling();
169+
.disableRedirectHandling()
170+
// SDK handle retries , this we do not need the http clients to handle the reties by itself
171+
.disableAutomaticRetries();
170172

171173
addProxyConfig(builder, configuration);
172174

services/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,12 @@
516516
<version>${awsjavasdk.version}</version>
517517
<scope>runtime</scope>
518518
</dependency>
519+
<dependency>
520+
<artifactId>apache5-client</artifactId>
521+
<groupId>software.amazon.awssdk</groupId>
522+
<version>${awsjavasdk.version}</version>
523+
<scope>runtime</scope>
524+
</dependency>
519525
<dependency>
520526
<artifactId>netty-nio-client</artifactId>
521527
<groupId>software.amazon.awssdk</groupId>

test/codegen-generated-classes-test/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,12 @@
235235
<version>${awsjavasdk.version}</version>
236236
<scope>test</scope>
237237
</dependency>
238+
<dependency>
239+
<groupId>software.amazon.awssdk</groupId>
240+
<artifactId>apache5-client</artifactId>
241+
<version>${awsjavasdk.version}</version>
242+
<scope>test</scope>
243+
</dependency>
238244
<dependency>
239245
<groupId>org.assertj</groupId>
240246
<artifactId>assertj-core</artifactId>

test/module-path-tests/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@
5959
<artifactId>apache-client</artifactId>
6060
<version>${awsjavasdk.version}</version>
6161
</dependency>
62+
<dependency>
63+
<groupId>software.amazon.awssdk</groupId>
64+
<artifactId>apache5-client</artifactId>
65+
<version>${awsjavasdk.version}</version>
66+
</dependency>
6267
<dependency>
6368
<groupId>software.amazon.awssdk</groupId>
6469
<artifactId>netty-nio-client</artifactId>

test/protocol-tests/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@
9393
<version>${awsjavasdk.version}</version>
9494
<scope>runtime</scope>
9595
</dependency>
96+
<dependency>
97+
<groupId>software.amazon.awssdk</groupId>
98+
<artifactId>apache5-client</artifactId>
99+
<version>${awsjavasdk.version}</version>
100+
<scope>runtime</scope>
101+
</dependency>
96102
<dependency>
97103
<groupId>software.amazon.awssdk</groupId>
98104
<artifactId>http-client-spi</artifactId>

test/sdk-benchmarks/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@
158158
<artifactId>apache-client</artifactId>
159159
<version>${awsjavasdk.version}</version>
160160
</dependency>
161+
<dependency>
162+
<groupId>software.amazon.awssdk</groupId>
163+
<artifactId>apache5-client</artifactId>
164+
<version>${awsjavasdk.version}</version>
165+
</dependency>
161166
<dependency>
162167
<groupId>software.amazon.awssdk</groupId>
163168
<artifactId>protocol-tests</artifactId>

test/sdk-native-image-test/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@
6767
<version>${awsjavasdk.version}</version>
6868
</dependency>
6969

70+
<dependency>
71+
<groupId>software.amazon.awssdk</groupId>
72+
<artifactId>apache5-client</artifactId>
73+
<version>${awsjavasdk.version}</version>
74+
</dependency>
7075

7176
<dependency>
7277
<groupId>org.slf4j</groupId>

0 commit comments

Comments
 (0)