Skip to content

Commit

Permalink
[WIP] Quarkus: separate service module from server artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
adutra committed Jan 9, 2025
1 parent e0a6074 commit 9477208
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 18 deletions.
1 change: 1 addition & 0 deletions gradle/projects.main.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ polaris-api-management-model=api/management-model
polaris-api-management-service=api/management-service
polaris-service-common=service/common
polaris-quarkus-service=quarkus/service
polaris-quarkus-server=quarkus/server
polaris-eclipselink=extension/persistence/eclipselink
polaris-jpa-model=extension/persistence/jpa-model
aggregated-license-report=aggregated-license-report
Expand Down
12 changes: 12 additions & 0 deletions quarkus/server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Polaris Quarkus Server

This module contains the Quarkus-based Polaris server main artifact.

Building this module will create a zip/tar distribution with the Polaris server.

To also build the Docker image, you can use the following command (a running Docker daemon is
required):

```shell
./gradlew :polaris-quarkus-server:build -Dquarkus.container-image.build=true
```
55 changes: 55 additions & 0 deletions quarkus/server/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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 {
alias(libs.plugins.quarkus)
alias(libs.plugins.openapi.generator)
id("polaris-server")
id("polaris-license-report")
id("distribution")
}

dependencies {
implementation(project(":polaris-core"))
implementation(project(":polaris-api-management-service"))
implementation(project(":polaris-api-iceberg-service"))
implementation(project(":polaris-service-common"))
implementation(project(":polaris-quarkus-service"))

implementation(platform(libs.quarkus.bom))
implementation("io.quarkus:quarkus-container-image-docker")

// override dnsjava version in dependencies due to https://github.com/dnsjava/dnsjava/issues/329
implementation(platform(libs.dnsjava))
}

tasks.named("distZip") { dependsOn("quarkusBuild") }

tasks.named("distTar") { dependsOn("quarkusBuild") }

distributions {
main {
contents {
from(project.layout.buildDirectory.dir("quarkus-app"))
from("../../NOTICE")
from("../../LICENSE-BINARY-DIST").rename("LICENSE-BINARY-DIST", "LICENSE")
exclude("lib/main/io.quarkus.quarkus-container-image*")
}
}
}
26 changes: 26 additions & 0 deletions quarkus/server/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.
#

quarkus.application.name=Apache Polaris Server (incubating)

quarkus.container-image.build=false
quarkus.container-image.push=false
quarkus.container-image.registry=docker.io
quarkus.container-image.group=apache
quarkus.container-image.name=polaris
15 changes: 4 additions & 11 deletions quarkus/service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@

plugins {
alias(libs.plugins.quarkus)
alias(libs.plugins.openapi.generator)
alias(libs.plugins.jandex)
id("polaris-server")
id("polaris-license-report")
id("application")
}

dependencies {
Expand Down Expand Up @@ -180,11 +178,6 @@ tasks.named("compileJava") { dependsOn("compileQuarkusGeneratedSourcesJava") }

tasks.named("sourcesJar") { dependsOn("compileQuarkusGeneratedSourcesJava") }

distributions {
main {
contents {
from("../../NOTICE")
from("../../LICENSE-BINARY-DIST").rename("LICENSE-BINARY-DIST", "LICENSE")
}
}
}
tasks.named("javadoc") { dependsOn("jandex") }

tasks.named("quarkusDependenciesBuild") { dependsOn("jandex") }
7 changes: 0 additions & 7 deletions quarkus/service/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,10 @@
# under the License.
#

quarkus.application.name=Apache Polaris (incubating)
quarkus.banner.path=/org/apache/polaris/service/banner.txt

quarkus.config.mapping.validate-unknown=true

quarkus.container-image.build=false
quarkus.container-image.push=false
quarkus.container-image.registry=docker.io
quarkus.container-image.group=apache
quarkus.container-image.name=polaris

quarkus.http.auth.basic=false
quarkus.http.access-log.enabled=true
# quarkus.http.access-log.pattern=common
Expand Down

0 comments on commit 9477208

Please sign in to comment.