dimas-b commented on code in PR #1589:
URL: https://github.com/apache/polaris/pull/1589#discussion_r2105234544
##########
quarkus/server/build.gradle.kts:
##########
@@ -84,78 +79,13 @@ tasks.named<QuarkusRun>("quarkusRun") {
listOf("-Dpolaris.bootstrap.credentials=POLARIS,root,secret",
"-Dquarkus.console.color=true")
}
-distributions {
- main {
- contents {
- from(runScript)
- from(project.layout.buildDirectory.dir("quarkus-app"))
- from("distribution/NOTICE")
- from("distribution/LICENSE")
- from("distribution/README.md")
- from("distribution/DISCLAIMER")
- }
- }
-}
-
val quarkusBuild = tasks.named<QuarkusBuild>("quarkusBuild")
-val distTar =
- tasks.named<Tar>("distTar") {
- dependsOn(quarkusBuild)
- inputs.files(runScript)
- compression = Compression.GZIP
- }
-
-val distZip =
- tasks.named<Zip>("distZip") {
- dependsOn(quarkusBuild)
- inputs.files(runScript)
- }
-
-val digestDistTar =
- tasks.register<GenerateDigest>("digestDistTar") {
- description = "Generate the distribution tar digest"
- mustRunAfter(distTar)
- file.set { distTar.get().archiveFile.get().asFile }
- }
-
-val digestDistZip =
- tasks.register<GenerateDigest>("digestDistZip") {
- description = "Generate the distribution zip digest"
- mustRunAfter(distZip)
- file.set { distZip.get().archiveFile.get().asFile }
- }
-
-distTar.configure { finalizedBy(digestDistTar) }
-
-distZip.configure { finalizedBy(digestDistZip) }
-
-if (project.hasProperty("release") || project.hasProperty("signArtifacts")) {
- signing {
- sign(distTar.get())
- sign(distZip.get())
- }
-}
-
// Expose runnable jar via quarkusRunner configuration for integration-tests
that require the
// server.
artifacts {
add(quarkusRunner.name, provider {
quarkusBuild.get().fastJar.resolve("quarkus-run.jar") }) {
builtBy(quarkusBuild)
}
- add(distributionTar.name, provider { distTar.get().archiveFile }) {
builtBy(distTar) }
- add(distributionTar.name, provider { digestDistTar.get().outputFile }) {
builtBy(digestDistTar) }
- add(distributionZip.name, provider { distZip.get().archiveFile }) {
builtBy(distZip) }
- add(distributionZip.name, provider { digestDistZip.get().outputFile }) {
builtBy(digestDistZip) }
-}
-
-afterEvaluate {
- publishing {
- publications {
- named<MavenPublication>("maven") {
- artifact(distTar.get().archiveFile) { builtBy(distTar) }
- artifact(distZip.get().archiveFile) { builtBy(distZip) }
- }
- }
- }
+ add("distributionElements", layout.buildDirectory.dir("quarkus-app")) {
builtBy("quarkusBuild") }
Review Comment:
After untar:
```
$ ls server/
app lib logs quarkus quarkus-app-dependencies.txt quarkus-run.jar
```
Is `quarkus-app-dependencies.txt` intended to be in the distro? (same for
admin)
##########
quarkus/distribution/README.md:
##########
@@ -0,0 +1,73 @@
+<!--
+ 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.
+-->
+
+# Apache Polaris Distribution
+
+This distribution contains both the Polaris Server and Admin Tool.
+
+## Prerequisites
+
+- Java SE 21 or higher
+
+## Directory Structure
+
+```
+polaris-quarkus-distribution-@version@/
+├── LICENSE
+├── NOTICE
+├── README.md
+├── admin/ # Admin tool files
+├── bin/ # Executable scripts
+│ ├── admin
+│ └── server
+└── server/ # Server files
+```
+
+## Usage
+
+The distribution includes separate scripts for running the server and admin
tool:
+
+### Start the Server
+
+```bash
+./bin/server
+```
+
+### Use the Admin Tool
+
+```bash
+./bin/admin --help # Show admin commands
+./bin/admin bootstrap -h # Show bootstrap help
+./bin/admin purge -h # Show purge help
+```
+
+### Configuration
+
+Both components can be configured using environment variables or system
properties. For example:
+
+```bash
+# Configure server port
+JAVA_OPTS="-Dquarkus.http.port=8080" ./bin/server
Review Comment:
I believe `env JAVA_OPTS="-Dquarkus.http.port=8080" bin/server` is more
portable. IIRC, current syntax assumes running in `sh` or `bash`.
##########
quarkus/distribution/README.md:
##########
@@ -0,0 +1,73 @@
+<!--
+ 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.
+-->
+
+# Apache Polaris Distribution
+
+This distribution contains both the Polaris Server and Admin Tool.
+
+## Prerequisites
+
+- Java SE 21 or higher
+
+## Directory Structure
+
+```
+polaris-quarkus-distribution-@version@/
+├── LICENSE
+├── NOTICE
+├── README.md
+├── admin/ # Admin tool files
+├── bin/ # Executable scripts
+│ ├── admin
+│ └── server
+└── server/ # Server files
+```
+
+## Usage
+
+The distribution includes separate scripts for running the server and admin
tool:
+
+### Start the Server
+
+```bash
+./bin/server
+```
+
+### Use the Admin Tool
+
+```bash
+./bin/admin --help # Show admin commands
+./bin/admin bootstrap -h # Show bootstrap help
+./bin/admin purge -h # Show purge help
+```
+
+### Configuration
+
+Both components can be configured using environment variables or system
properties. For example:
+
+```bash
+# Configure server port
+JAVA_OPTS="-Dquarkus.http.port=8080" ./bin/server
+
+# Configure admin tool
+JAVA_OPTS="-Dpolaris.persistence.type=relational-jdbc" ./bin/admin
Review Comment:
I do not think `JAVA_OPTS` work with the latest scripts :thinking:
##########
quarkus/distribution/README.md:
##########
@@ -0,0 +1,73 @@
+<!--
+ 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.
+-->
+
+# Apache Polaris Distribution
+
+This distribution contains both the Polaris Server and Admin Tool.
+
+## Prerequisites
+
+- Java SE 21 or higher
+
+## Directory Structure
+
+```
+polaris-quarkus-distribution-@version@/
+├── LICENSE
+├── NOTICE
+├── README.md
+├── admin/ # Admin tool files
+├── bin/ # Executable scripts
+│ ├── admin
+│ └── server
+└── server/ # Server files
+```
+
+## Usage
+
+The distribution includes separate scripts for running the server and admin
tool:
+
+### Start the Server
+
+```bash
+./bin/server
Review Comment:
nit: `bin/server` (`./` is not necessary, PATH is not used anyway)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]