Skip to content

Commit

Permalink
Quarkus: split out code from :nessie-quarkus into separate modules (#…
Browse files Browse the repository at this point in the history
…9189)

No functional changes, just cleaning up the `:nessie-quarkus` module.
  • Loading branch information
snazy authored Jul 25, 2024
1 parent 6640b8b commit a9028f1
Show file tree
Hide file tree
Showing 48 changed files with 270 additions and 37 deletions.
4 changes: 4 additions & 0 deletions bom/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ dependencies {
api(project(":nessie-nessie-testcontainer"))
api(project(":nessie-network-tools"))
api(project(":nessie-quarkus-auth"))
api(project(":nessie-quarkus-catalog"))
api(project(":nessie-quarkus-distcache"))
api(project(":nessie-quarkus-common"))
api(project(":nessie-quarkus-config"))
api(project(":nessie-quarkus-rest"))
api(project(":nessie-server-admin-tool"))
api(project(":nessie-quarkus"))
api(project(":nessie-quarkus-tests"))
Expand Down
6 changes: 5 additions & 1 deletion gradle/projects.main.properties
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ nessie-keycloak-testcontainer=testing/keycloak-container
nessie-nessie-testcontainer=testing/nessie-container
nessie-network-tools=tools/network
nessie-object-storage-mock=testing/object-storage-mock
nessie-quarkus=servers/quarkus-server
nessie-quarkus-auth=servers/quarkus-auth
nessie-quarkus-catalog=servers/quarkus-catalog
nessie-quarkus-common=servers/quarkus-common
nessie-quarkus=servers/quarkus-server
nessie-quarkus-config=servers/quarkus-config
nessie-quarkus-distcache=servers/quarkus-distcache
nessie-quarkus-rest=servers/quarkus-rest
nessie-quarkus-tests=servers/quarkus-tests
nessie-rest-common=servers/rest-common
nessie-rest-services=servers/rest-services
Expand Down
10 changes: 9 additions & 1 deletion servers/quarkus-auth/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,17 @@ plugins {

publishingHelper { mavenName = "Nessie - Auth for Quarkus based servers" }

// Need to use :nessie-model-quarkus instead of :nessie-model here, because Quarkus w/
// resteasy-reactive does not work well with multi-release jars, but as long as we support Java 8
// for clients, we have to live with :nessie-model producing an MR-jar. See
// https://github.com/quarkusio/quarkus/issues/40236 and
// https://github.com/projectnessie/nessie/issues/8390.
configurations.all { exclude(group = "org.projectnessie.nessie", module = "nessie-model") }

dependencies {
implementation(project(":nessie-model"))
implementation(project(":nessie-model-quarkus"))
implementation(project(":nessie-quarkus-common"))
implementation(project(":nessie-quarkus-config"))
implementation(project(":nessie-services"))
implementation(project(":nessie-versioned-spi"))

Expand Down
82 changes: 82 additions & 0 deletions servers/quarkus-catalog/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/*
* Copyright (C) 2022 Dremio
*
* Licensed 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.
*/

plugins { id("nessie-conventions-quarkus") }

publishingHelper { mavenName = "Nessie - Quarkus Catalog" }

// Need to use :nessie-model-quarkus instead of :nessie-model here, because Quarkus w/
// resteasy-reactive does not work well with multi-release jars, but as long as we support Java 8
// for clients, we have to live with :nessie-model producing an MR-jar. See
// https://github.com/quarkusio/quarkus/issues/40236 and
// https://github.com/projectnessie/nessie/issues/8390.
configurations.all { exclude(group = "org.projectnessie.nessie", module = "nessie-model") }

dependencies {
implementation(project(":nessie-combined-cs"))
implementation(project(":nessie-rest-services"))
implementation(project(":nessie-quarkus-config"))
implementation(project(":nessie-quarkus-common"))
implementation(project(":nessie-catalog-files-api"))
implementation(project(":nessie-catalog-files-impl"))
implementation(project(":nessie-catalog-secrets-api"))
implementation(project(":nessie-catalog-service-common"))
implementation(project(":nessie-catalog-service-impl"))
implementation(project(":nessie-catalog-service-rest"))
implementation(project(":nessie-tasks-api"))
implementation(project(":nessie-tasks-service-async"))
implementation(project(":nessie-tasks-service-impl"))
implementation(project(":nessie-services-config"))
implementation(project(":nessie-versioned-storage-common"))

implementation(enforcedPlatform(libs.quarkus.bom))
implementation(enforcedPlatform(libs.quarkus.amazon.services.bom))
implementation("io.quarkus:quarkus-core")
implementation("io.quarkus:quarkus-jackson")
implementation("io.micrometer:micrometer-core")
implementation("io.smallrye.config:smallrye-config-core")
implementation("io.smallrye:smallrye-context-propagation")
implementation(
"org.eclipse.microprofile.context-propagation:microprofile-context-propagation-api"
)
implementation("org.eclipse.microprofile.health:microprofile-health-api")

implementation(libs.jakarta.ws.rs.api)

implementation(platform(libs.awssdk.bom))
implementation("software.amazon.awssdk:s3")
implementation("software.amazon.awssdk:sts")
implementation("software.amazon.awssdk:apache-client") {
exclude("commons-logging", "commons-logging")
}

implementation(platform(libs.google.cloud.storage.bom))
implementation("com.google.cloud:google-cloud-storage")

implementation(platform(libs.azuresdk.bom))
implementation("com.azure:azure-storage-file-datalake")
implementation("com.azure:azure-identity")

implementation(libs.guava)

testFixturesApi(platform(libs.junit.bom))
testFixturesApi(libs.bundles.junit.testing)

testFixturesApi(enforcedPlatform(libs.quarkus.bom))
testFixturesApi("io.quarkus:quarkus-core")

testRuntimeOnly(libs.logback.classic)
}
13 changes: 9 additions & 4 deletions servers/quarkus-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@
* limitations under the License.
*/

plugins {
id("nessie-conventions-quarkus")
id("nessie-jacoco")
}
plugins { id("nessie-conventions-quarkus") }

publishingHelper { mavenName = "Nessie - Quarkus Common" }

// Need to use :nessie-model-quarkus instead of :nessie-model here, because Quarkus w/
// resteasy-reactive does not work well with multi-release jars, but as long as we support Java 8
// for clients, we have to live with :nessie-model producing an MR-jar. See
// https://github.com/quarkusio/quarkus/issues/40236 and
// https://github.com/projectnessie/nessie/issues/8390.
configurations.all { exclude(group = "org.projectnessie.nessie", module = "nessie-model") }

dependencies {
implementation(project(":nessie-model"))
implementation(project(":nessie-rest-common"))
Expand All @@ -32,6 +36,7 @@ dependencies {
implementation(project(":nessie-catalog-files-impl"))
implementation(project(":nessie-catalog-service-common"))
implementation(project(":nessie-catalog-secrets-api"))
implementation(project(":nessie-quarkus-config"))

compileOnly(project(":nessie-doc-generator-annotations"))

Expand Down
51 changes: 51 additions & 0 deletions servers/quarkus-config/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright (C) 2022 Dremio
*
* Licensed 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.
*/

plugins { id("nessie-conventions-quarkus") }

publishingHelper { mavenName = "Nessie - Quarkus Config Types" }

// Need to use :nessie-model-quarkus instead of :nessie-model here, because Quarkus w/
// resteasy-reactive does not work well with multi-release jars, but as long as we support Java 8
// for clients, we have to live with :nessie-model producing an MR-jar. See
// https://github.com/quarkusio/quarkus/issues/40236 and
// https://github.com/projectnessie/nessie/issues/8390.
configurations.all { exclude(group = "org.projectnessie.nessie", module = "nessie-model") }

dependencies {
implementation(project(":nessie-services-config"))
implementation(project(":nessie-versioned-storage-common"))
implementation(project(":nessie-catalog-files-api"))
implementation(project(":nessie-catalog-files-impl"))
implementation(project(":nessie-catalog-service-common"))
implementation(project(":nessie-catalog-secrets-api"))

compileOnly(project(":nessie-doc-generator-annotations"))

compileOnly(enforcedPlatform(libs.quarkus.bom))
compileOnly("io.quarkus:quarkus-core")
compileOnly("io.smallrye.config:smallrye-config-core")

implementation(libs.guava)

testFixturesApi(platform(libs.junit.bom))
testFixturesApi(libs.bundles.junit.testing)

testFixturesApi(enforcedPlatform(libs.quarkus.bom))
testFixturesApi("io.quarkus:quarkus-core")

testRuntimeOnly(libs.logback.classic)
}
50 changes: 50 additions & 0 deletions servers/quarkus-distcache/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* Copyright (C) 2022 Dremio
*
* Licensed 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.
*/

plugins { id("nessie-conventions-quarkus") }

publishingHelper { mavenName = "Nessie - Quarkus Dist-Cache" }

// Need to use :nessie-model-quarkus instead of :nessie-model here, because Quarkus w/
// resteasy-reactive does not work well with multi-release jars, but as long as we support Java 8
// for clients, we have to live with :nessie-model producing an MR-jar. See
// https://github.com/quarkusio/quarkus/issues/40236 and
// https://github.com/projectnessie/nessie/issues/8390.
configurations.all { exclude(group = "org.projectnessie.nessie", module = "nessie-model") }

dependencies {
implementation(project(":nessie-quarkus-config"))
implementation(project(":nessie-quarkus-common"))
implementation(project(":nessie-versioned-storage-cache"))
implementation(project(":nessie-versioned-storage-common"))
implementation(project(":nessie-network-tools"))

implementation(enforcedPlatform(libs.quarkus.bom))
implementation("io.quarkus:quarkus-core")
implementation("io.quarkus:quarkus-resteasy-reactive")

implementation("com.fasterxml.jackson.core:jackson-databind")
compileOnly("com.fasterxml.jackson.core:jackson-annotations")

implementation(libs.guava)
implementation(libs.slf4j.api)

compileOnly(libs.immutables.value.annotations)
annotationProcessor(libs.immutables.value.processor)

testFixturesApi(platform(libs.junit.bom))
testFixturesApi(libs.bundles.junit.testing)
}
39 changes: 39 additions & 0 deletions servers/quarkus-rest/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright (C) 2022 Dremio
*
* Licensed 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.
*/

plugins { id("nessie-conventions-quarkus") }

publishingHelper { mavenName = "Nessie - Quarkus REST" }

// Need to use :nessie-model-quarkus instead of :nessie-model here, because Quarkus w/
// resteasy-reactive does not work well with multi-release jars, but as long as we support Java 8
// for clients, we have to live with :nessie-model producing an MR-jar. See
// https://github.com/quarkusio/quarkus/issues/40236 and
// https://github.com/projectnessie/nessie/issues/8390.
configurations.all { exclude(group = "org.projectnessie.nessie", module = "nessie-model") }

dependencies {
implementation(project(":nessie-model-quarkus"))
implementation(project(":nessie-rest-common"))

implementation(enforcedPlatform(libs.quarkus.bom))
implementation("io.quarkus:quarkus-core")
implementation("io.quarkus:quarkus-resteasy-reactive")
implementation("io.quarkus:quarkus-resteasy-reactive-jackson")

implementation("com.fasterxml.jackson.core:jackson-databind")
compileOnly("com.fasterxml.jackson.core:jackson-annotations")
}
40 changes: 10 additions & 30 deletions servers/quarkus-server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import org.apache.tools.ant.taskdefs.condition.Os
plugins {
alias(libs.plugins.quarkus)
id("nessie-conventions-quarkus")
id("nessie-jacoco")
id("nessie-license-report")
}

Expand All @@ -36,7 +35,7 @@ val openapiSource by

val versionIceberg = libs.versions.iceberg.get()

// Need to use :nessie-model-jakarta instead of :nessie-model here, because Quarkus w/
// Need to use :nessie-model-quarkus instead of :nessie-model here, because Quarkus w/
// resteasy-reactive does not work well with multi-release jars, but as long as we support Java 8
// for clients, we have to live with :nessie-model producing an MR-jar. See
// https://github.com/quarkusio/quarkus/issues/40236 and
Expand All @@ -45,31 +44,21 @@ configurations.all { exclude(group = "org.projectnessie.nessie", module = "nessi

dependencies {
implementation(project(":nessie-client"))
implementation(project(":nessie-combined-cs"))
implementation(project(":nessie-model-quarkus"))
implementation(project(":nessie-services"))
implementation(project(":nessie-services-config"))
implementation(project(":nessie-quarkus-auth"))
implementation(project(":nessie-quarkus-catalog"))
implementation(project(":nessie-quarkus-common"))
implementation(project(":nessie-quarkus-config"))
implementation(project(":nessie-quarkus-distcache"))
implementation(project(":nessie-quarkus-rest"))
implementation(project(":nessie-events-quarkus"))
implementation(project(":nessie-rest-common"))
implementation(project(":nessie-rest-services"))
implementation(project(":nessie-tasks-api"))
implementation(project(":nessie-tasks-service-async"))
implementation(project(":nessie-tasks-service-impl"))
implementation(project(":nessie-versioned-spi"))
implementation(project(":nessie-network-tools"))
implementation(project(":nessie-notice"))
implementation(project(":nessie-versioned-storage-cache"))
implementation(project(":nessie-versioned-storage-common"))
implementation(project(":nessie-versioned-storage-jdbc"))
implementation(project(":nessie-catalog-files-api"))
implementation(project(":nessie-catalog-files-impl"))
implementation(project(":nessie-catalog-model"))
implementation(project(":nessie-catalog-service-common"))
implementation(project(":nessie-catalog-service-impl"))
implementation(project(":nessie-catalog-service-rest"))
implementation(project(":nessie-catalog-secrets-api"))
implementation(libs.nessie.ui)

implementation(enforcedPlatform(libs.quarkus.bom))
Expand All @@ -94,20 +83,6 @@ dependencies {
implementation(platform(libs.cel.bom))
implementation("org.projectnessie.cel:cel-standalone")

implementation(platform(libs.awssdk.bom))
implementation("software.amazon.awssdk:s3")
implementation("software.amazon.awssdk:sts")
implementation("software.amazon.awssdk:apache-client") {
exclude("commons-logging", "commons-logging")
}

implementation(platform(libs.google.cloud.storage.bom))
implementation("com.google.cloud:google-cloud-storage")

implementation(platform(libs.azuresdk.bom))
implementation("com.azure:azure-storage-file-datalake")
implementation("com.azure:azure-identity")

implementation(libs.guava)

compileOnly(libs.microprofile.openapi)
Expand All @@ -128,6 +103,8 @@ dependencies {
testFixturesApi(project(":nessie-quarkus-auth"))
testFixturesApi(project(":nessie-quarkus-common"))
testFixturesApi(project(":nessie-quarkus-tests"))
testFixturesApi(project(":nessie-catalog-files-api"))
testFixturesApi(project(":nessie-catalog-files-impl"))
testFixturesApi(project(":nessie-events-api"))
testFixturesApi(project(":nessie-events-spi"))
testFixturesApi(project(":nessie-events-service"))
Expand Down Expand Up @@ -220,8 +197,11 @@ quarkus {
}

val quarkusAppPartsBuild = tasks.named("quarkusAppPartsBuild")
val quarkusDependenciesBuild = tasks.named("quarkusDependenciesBuild")
val quarkusBuild = tasks.named<QuarkusBuild>("quarkusBuild")

quarkusDependenciesBuild.configure { dependsOn("processJandexIndex") }

quarkusAppPartsBuild.configure {
dependsOn(pullOpenApiSpec)
inputs.files(openapiSource)
Expand Down
Loading

0 comments on commit a9028f1

Please sign in to comment.