Skip to content

Commit 5e5325f

Browse files
committed
Validating runtime dependencies for conflicts
1 parent c848484 commit 5e5325f

File tree

54 files changed

+101
-53
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+101
-53
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ build/distributions/tiered-storage-for-apache-kafka-$(VERSION).tgz:
3434
./gradlew build distTar -x test -x integrationTest -x e2e:test
3535

3636
storage/s3/build/distributions/s3-$(VERSION).tgz:
37-
./gradlew build :storage:s3:distTar -x test -x integrationTest -x e2e:test
37+
./gradlew build :storage:plugins:s3:distTar -x test -x integrationTest -x e2e:test
3838

3939
storage/gcs/build/distributions/gcs-$(VERSION).tgz:
40-
./gradlew build :storage:gcs:distTar -x test -x integrationTest -x e2e:test
40+
./gradlew build :storage:plugins:gcs:distTar -x test -x integrationTest -x e2e:test
4141

4242
storage/gcs/build/distributions/azure-$(VERSION).tgz:
43-
./gradlew build :storage:azure:distTar -x test -x integrationTest -x e2e:test
43+
./gradlew build :storage:plugins:azure:distTar -x test -x integrationTest -x e2e:test
4444

4545
test: build
4646
./gradlew test -x e2e:test

build.gradle

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ subprojects {
7474
withJavadocJar()
7575
withSourcesJar()
7676
}
77+
configurations.runtimeClasspath {
78+
resolutionStrategy {
79+
failOnVersionConflict()
80+
}
81+
}
7782

7883
checkstyle {
7984
toolVersion = "10.12.0"
@@ -123,29 +128,35 @@ subprojects {
123128

124129
azureSdkVersion = "1.2.21"
125130

126-
testcontainersVersion = "1.19.4"
131+
testcontainersVersion = "1.19.7"
127132

128133
testcontainersFakeGcsServerVersion = "0.2.0"
129134
}
130135

131136
dependencies {
132137
compileOnly "org.apache.kafka:kafka-clients:$kafkaVersion"
133-
compileOnly "org.apache.kafka:kafka-storage-api:$kafkaVersion"
138+
compileOnly("org.apache.kafka:kafka-storage-api:$kafkaVersion") {
139+
exclude group: "com.fasterxml.jackson.core"
140+
}
134141

135142
compileOnly "org.slf4j:slf4j-api:$slf4jVersion"
136143

137144
testImplementation "org.apache.kafka:kafka-clients:$kafkaVersion"
138-
testImplementation "org.apache.kafka:kafka-storage-api:$kafkaVersion"
145+
testImplementation("org.apache.kafka:kafka-storage-api:$kafkaVersion"){
146+
exclude group: "com.fasterxml.jackson.core"
147+
}
139148

140-
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
141-
testImplementation "org.junit.jupiter:junit-jupiter-params:$junitVersion"
142-
testImplementation 'org.junit.platform:junit-platform-launcher:$junitPlatformVersion'
143-
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
149+
testImplementation(platform("org.junit:junit-bom:$junitVersion"))
150+
testImplementation "org.junit.jupiter:junit-jupiter-api"
151+
testImplementation "org.junit.jupiter:junit-jupiter-params"
152+
testImplementation "org.junit.platform:junit-platform-launcher"
153+
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
144154

145155
testImplementation "org.assertj:assertj-core:$assertJVersion"
146156

147-
testImplementation "org.mockito:mockito-core:$mockitoVersion"
148-
testImplementation "org.mockito:mockito-junit-jupiter:$mockitoVersion"
157+
testImplementation(platform("org.mockito:mockito-bom:$mockitoVersion"))
158+
testImplementation "org.mockito:mockito-core"
159+
testImplementation "org.mockito:mockito-junit-jupiter"
149160

150161
testImplementation "org.awaitility:awaitility:$awaitilityVersion"
151162

@@ -241,8 +252,8 @@ distributions {
241252
from(project(":core").configurations.runtimeClasspath)
242253
from(project(":storage:core").jar)
243254
from(project(":storage:core").configurations.runtimeClasspath)
244-
from(project(":storage:filesystem").jar)
245-
from(project(":storage:filesystem").configurations.runtimeClasspath)
255+
from(project(":storage:plugins:filesystem").jar)
256+
from(project(":storage:plugins:filesystem").configurations.runtimeClasspath)
246257
}
247258
}
248259
}

core/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ dependencies {
4747
implementation project(':commons')
4848

4949
testImplementation(testFixtures(project(":storage:core")))
50-
testImplementation(project(":storage:filesystem"))
50+
testImplementation(project(":storage:plugins:filesystem"))
5151

5252
testImplementation "com.github.luben:zstd-jni:$zstdVersion"
5353
integrationTestImplementation sourceSets.test.output

docker/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ RUN cd /tiered-storage-for-apache-kafka/core \
3333
&& tar -xf tiered-storage-for-apache-kafka-${_VERSION}.tgz --strip-components=1 \
3434
&& rm tiered-storage-for-apache-kafka-${_VERSION}.tgz
3535

36-
COPY storage/s3/build/distributions/s3-${_VERSION}.tgz /tiered-storage-for-apache-kafka/s3
36+
COPY storage/plugins/s3/build/distributions/s3-${_VERSION}.tgz /tiered-storage-for-apache-kafka/s3
3737
RUN cd /tiered-storage-for-apache-kafka/s3 \
3838
&& tar -xf s3-${_VERSION}.tgz --strip-components=1 \
3939
&& rm s3-${_VERSION}.tgz
4040

41-
COPY storage/gcs/build/distributions/gcs-${_VERSION}.tgz /tiered-storage-for-apache-kafka/gcs
41+
COPY storage/plugins/gcs/build/distributions/gcs-${_VERSION}.tgz /tiered-storage-for-apache-kafka/gcs
4242
RUN cd /tiered-storage-for-apache-kafka/gcs \
4343
&& tar -xf gcs-${_VERSION}.tgz --strip-components=1 \
4444
&& rm gcs-${_VERSION}.tgz
4545

46-
COPY storage/azure/build/distributions/azure-${_VERSION}.tgz /tiered-storage-for-apache-kafka/azure
46+
COPY storage/plugins/azure/build/distributions/azure-${_VERSION}.tgz /tiered-storage-for-apache-kafka/azure
4747
RUN cd /tiered-storage-for-apache-kafka/azure \
4848
&& tar -xf azure-${_VERSION}.tgz --strip-components=1 \
4949
&& rm azure-${_VERSION}.tgz

settings.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ rootProject.name = 'tiered-storage-for-apache-kafka'
1818
include 'core'
1919
include 'storage'
2020
include 'storage:core'
21-
include 'storage:filesystem'
22-
include 'storage:azure'
23-
include 'storage:gcs'
24-
include 'storage:s3'
21+
include 'storage:plugins'
22+
include 'storage:plugins:filesystem'
23+
include 'storage:plugins:azure'
24+
include 'storage:plugins:gcs'
25+
include 'storage:plugins:s3'
2526
include 'e2e'
2627
include 'commons'

storage/plugins/azure/build.gradle

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright 2023 Aiven Oy
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
archivesBaseName = "storage-azure"
18+
19+
dependencies {
20+
implementation platform("com.azure:azure-sdk-bom:$azureSdkVersion")
21+
implementation("com.azure:azure-identity") {
22+
exclude group: "org.slf4j"
23+
exclude group: "net.java.dev.jna"
24+
exclude group: "com.fasterxml.jackson.core"
25+
exclude group: "com.fasterxml.jackson.datatype"
26+
exclude group: "com.microsoft.azure", module: "msal4j"
27+
}
28+
implementation("com.azure:azure-storage-blob") {
29+
exclude group: "org.slf4j"
30+
exclude group: "com.fasterxml.jackson.core"
31+
exclude group: "com.fasterxml.jackson.datatype"
32+
exclude group: "com.fasterxml.jackson.dataformat"
33+
}
34+
35+
implementation project(":commons")
36+
37+
testImplementation("org.testcontainers:junit-jupiter:$testcontainersVersion") {
38+
exclude group: "com.fasterxml.jackson.core"
39+
}
40+
integrationTestImplementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion")
41+
integrationTestImplementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jacksonVersion")
42+
}

storage/azure/src/integration-test/java/io/aiven/kafka/tieredstorage/storage/azure/AzureBlobStorageAccountKeyTest.java renamed to storage/plugins/azure/src/integration-test/java/io/aiven/kafka/tieredstorage/storage/azure/AzureBlobStorageAccountKeyTest.java

File renamed without changes.

storage/azure/src/integration-test/java/io/aiven/kafka/tieredstorage/storage/azure/AzureBlobStorageConnectionStringTest.java renamed to storage/plugins/azure/src/integration-test/java/io/aiven/kafka/tieredstorage/storage/azure/AzureBlobStorageConnectionStringTest.java

File renamed without changes.

storage/azure/src/integration-test/java/io/aiven/kafka/tieredstorage/storage/azure/AzureBlobStorageMetricsTest.java renamed to storage/plugins/azure/src/integration-test/java/io/aiven/kafka/tieredstorage/storage/azure/AzureBlobStorageMetricsTest.java

File renamed without changes.

storage/azure/src/integration-test/java/io/aiven/kafka/tieredstorage/storage/azure/AzureBlobStorageSasTokenTest.java renamed to storage/plugins/azure/src/integration-test/java/io/aiven/kafka/tieredstorage/storage/azure/AzureBlobStorageSasTokenTest.java

File renamed without changes.

0 commit comments

Comments
 (0)