Drop apache http client, avoid rebase issues in S3 storage code

This commit is contained in:
Mike Primm 2022-02-24 17:54:47 -06:00
parent cf528d22cc
commit 58a2b16217
2 changed files with 2 additions and 9 deletions

View File

@ -21,11 +21,7 @@ dependencies {
implementation 'io.github.linktosriram:s3-lite-api:0.2.0' implementation 'io.github.linktosriram:s3-lite-api:0.2.0'
implementation 'io.github.linktosriram:s3-lite-http-client-url-connection:0.2.0' implementation 'io.github.linktosriram:s3-lite-http-client-url-connection:0.2.0'
implementation 'io.github.linktosriram:s3-lite-http-client-spi:0.2.0' implementation 'io.github.linktosriram:s3-lite-http-client-spi:0.2.0'
implementation 'io.github.linktosriram:s3-lite-http-client-apache:0.2.0'
implementation 'io.github.linktosriram:s3-lite-util:0.2.0' implementation 'io.github.linktosriram:s3-lite-util:0.2.0'
implementation 'org.apache.httpcomponents:httpclient:4.5.9'
implementation 'javax.xml.bind:jaxb-api:2.3.1'
implementation 'org.glassfish.jaxb:jaxb-runtime:2.3.1'
} }
processResources { processResources {
@ -64,9 +60,7 @@ shadowJar {
include(dependency('io.github.linktosriram:s3-lite-api:')) include(dependency('io.github.linktosriram:s3-lite-api:'))
include(dependency('io.github.linktosriram:s3-lite-http-client-url-connection:')) include(dependency('io.github.linktosriram:s3-lite-http-client-url-connection:'))
include(dependency('io.github.linktosriram:s3-lite-http-client-spi:')) include(dependency('io.github.linktosriram:s3-lite-http-client-spi:'))
include(dependency('io.github.linktosriram:s3-lite-http-client-apache:'))
include(dependency('io.github.linktosriram:s3-lite-util:')) include(dependency('io.github.linktosriram:s3-lite-util:'))
include(dependency('org.apache.httpcomponents:httpclient:'))
include(dependency(':DynmapCoreAPI')) include(dependency(':DynmapCoreAPI'))
exclude("META-INF/maven/**") exclude("META-INF/maven/**")
exclude("META-INF/services/**") exclude("META-INF/services/**")
@ -78,7 +72,6 @@ shadowJar {
relocate('javax.servlet', 'org.dynmap.javax.servlet' ) relocate('javax.servlet', 'org.dynmap.javax.servlet' )
relocate('org.postgresql', 'org.dynmap.org.postgresql') relocate('org.postgresql', 'org.dynmap.org.postgresql')
relocate('io.github.linktosriram.s3lite', 'org.dynmap.s3lite') relocate('io.github.linktosriram.s3lite', 'org.dynmap.s3lite')
relocate('org.apache', 'org.dynmap.apache')
destinationDir = file '../target' destinationDir = file '../target'
classifier = '' classifier = ''

View File

@ -41,8 +41,8 @@ import io.github.linktosriram.s3lite.api.response.ResponseBytes;
import io.github.linktosriram.s3lite.api.response.S3Object; import io.github.linktosriram.s3lite.api.response.S3Object;
import io.github.linktosriram.s3lite.core.auth.AwsBasicCredentials; import io.github.linktosriram.s3lite.core.auth.AwsBasicCredentials;
import io.github.linktosriram.s3lite.core.client.DefaultS3ClientBuilder; import io.github.linktosriram.s3lite.core.client.DefaultS3ClientBuilder;
import io.github.linktosriram.s3lite.http.apache.ApacheSdkHttpClient;
import io.github.linktosriram.s3lite.http.spi.request.RequestBody; import io.github.linktosriram.s3lite.http.spi.request.RequestBody;
import io.github.linktosriram.s3lite.http.urlconnection.URLConnectionSdkHttpClient;
public class AWSS3MapStorage extends MapStorage { public class AWSS3MapStorage extends MapStorage {
public class StorageTile extends MapStorageTile { public class StorageTile extends MapStorageTile {
@ -738,7 +738,7 @@ public class AWSS3MapStorage extends MapStorage {
c = new DefaultS3ClientBuilder() c = new DefaultS3ClientBuilder()
.credentialsProvider(() -> AwsBasicCredentials.create(access_key_id, secret_access_key)) .credentialsProvider(() -> AwsBasicCredentials.create(access_key_id, secret_access_key))
.region(Region.fromString(region)) .region(Region.fromString(region))
.httpClient(ApacheSdkHttpClient.defaultClient()) .httpClient(URLConnectionSdkHttpClient.create())
.build(); .build();
if (c == null) { if (c == null) {
Log.severe("Error creating S3 access client"); Log.severe("Error creating S3 access client");