diff --git a/build.gradle.kts b/build.gradle.kts index d597270..08a260b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ plugins { } group = "org.veupathdb.lib.s3" -version = "0.3.4+s34k-0.7.1" +version = "0.3.5+s34k-0.7.2" java { sourceCompatibility = JavaVersion.VERSION_1_8 @@ -36,10 +36,10 @@ dependencies { implementation(kotlin("stdlib")) implementation(kotlin("stdlib-jdk8")) implementation("org.slf4j:slf4j-api:1.7.36") - implementation("io.minio:minio:8.4.2") + implementation("io.minio:minio:8.4.5") @Suppress("GradlePackageVersionRange") - api("org.veupathdb.lib.s3:s34k-core:0.6.1+s34k-0.7.1") + api("org.veupathdb.lib.s3:s34k-core:0.6.1+s34k-0.7.2") testImplementation(kotlin("test")) } diff --git a/src/main/kotlin/org/veupathdb/lib/s3/s34k/minio/MClient.kt b/src/main/kotlin/org/veupathdb/lib/s3/s34k/minio/MClient.kt index 0da310f..bd820c2 100644 --- a/src/main/kotlin/org/veupathdb/lib/s3/s34k/minio/MClient.kt +++ b/src/main/kotlin/org/veupathdb/lib/s3/s34k/minio/MClient.kt @@ -1,16 +1,28 @@ package org.veupathdb.lib.s3.s34k.minio +import io.minio.MinioClient +import org.slf4j.LoggerFactory import org.veupathdb.lib.s3.s34k.S3Client import org.veupathdb.lib.s3.s34k.S3Config import org.veupathdb.lib.s3.s34k.minio.util.makeUrl internal class MClient(config: S3Config) : S3Client { - private val client = io.minio.MinioClient.builder() - .region(config.region) - .endpoint(config.makeUrl()) - .credentials(config.accessKey, config.secretKey) - .build() + private val logger = LoggerFactory.getLogger(javaClass) + + private val client: MinioClient + + init { + val url = config.makeUrl() + + logger.debug("Creating MinIO client for url: $url") + + client = MinioClient.builder() + .region(config.region) + .endpoint(url) + .credentials(config.accessKey, config.secretKey) + .build() + } override val defaultRegion = config.region diff --git a/test/build.gradle.kts b/test/build.gradle.kts index 36ad712..c90cf95 100644 --- a/test/build.gradle.kts +++ b/test/build.gradle.kts @@ -25,12 +25,12 @@ dependencies { implementation(kotlin("stdlib")) implementation(kotlin("stdlib-jdk8")) implementation("org.slf4j:slf4j-api:1.7.36") - implementation("io.minio:minio:8.4.2") + implementation("io.minio:minio:8.4.5") - implementation("org.veupathdb.lib.s3:s34k-minio:0.3.4+s34k-0.7.1") + implementation("org.veupathdb.lib.s3:s34k-minio:0.3.5+s34k-0.7.2") - implementation("org.apache.logging.log4j:log4j-core:2.17.2") - implementation("org.apache.logging.log4j:log4j-slf4j-impl:2.17.2") + implementation("org.apache.logging.log4j:log4j-core:2.19.0") + implementation("org.apache.logging.log4j:log4j-slf4j-impl:2.19.0") testImplementation(kotlin("test")) }