From b81e5e62a649b409ab28349e5bc04f20bc319952 Mon Sep 17 00:00:00 2001 From: Deven Phillips Date: Sun, 9 Mar 2025 08:56:14 -0400 Subject: [PATCH 1/3] Update archetype to Quarkus 3.19.2 --- pom.xml | 10 ++-- .../.openapi-generator-ignore | 2 +- .../resources/archetype-resources/pom.xml | 49 ++++++------------- ...pplication.properties => application.yaml} | 4 +- 4 files changed, 23 insertions(+), 42 deletions(-) rename src/main/resources/archetype-resources/src/main/resources/{application.properties => application.yaml} (54%) diff --git a/pom.xml b/pom.xml index dec8a70..c86369c 100644 --- a/pom.xml +++ b/pom.xml @@ -4,11 +4,11 @@ com.redhat.consulting openapi-quarkus-archetype - 1.0.9-SNAPSHOT + 2.0.0-SNAPSHOT maven-archetype openapi-quarkus-archetype - + OpenAPI And Quarkus Bootstrap Archetype https://github.com/redhat-appdev-practice/openapi-quarkus-archetype @@ -21,7 +21,7 @@ At least one license must be present. Here is an example of ASL v. 2.0 - + scm:git:git@github.com:redhat-appdev-practice/openapi-quarkus-archetype.git @@ -29,7 +29,7 @@ scm:git:https://github.com/redhat-appdev-practice/openapi-quarkus-archetype.git HEAD - + @@ -38,7 +38,7 @@ Red Hat - + diff --git a/src/main/resources/archetype-resources/.openapi-generator-ignore b/src/main/resources/archetype-resources/.openapi-generator-ignore index 7d0606f..03f6ed5 100644 --- a/src/main/resources/archetype-resources/.openapi-generator-ignore +++ b/src/main/resources/archetype-resources/.openapi-generator-ignore @@ -1,4 +1,4 @@ pom.xml build.gradle settings.gradle -src/main/resources/application.properties \ No newline at end of file +src/main/resources/application.yaml diff --git a/src/main/resources/archetype-resources/pom.xml b/src/main/resources/archetype-resources/pom.xml index d82b107..3bc84c7 100644 --- a/src/main/resources/archetype-resources/pom.xml +++ b/src/main/resources/archetype-resources/pom.xml @@ -5,16 +5,17 @@ ${artifactId} ${version} - 3.8.1 + 21 + 21 + 21 true - 11 - 11 + 3.11.0 UTF-8 UTF-8 quarkus-universe-bom io.quarkus - 2.6.1.Final - 3.0.0-M5 + 3.19.2 + 3.2.3 1.3.0 NodePort @@ -36,23 +37,24 @@ io.quarkus - quarkus-keycloak-authorization + quarkus-smallrye-openapi io.quarkus - quarkus-smallrye-openapi + quarkus-rest-jackson - io.quarkus - quarkus-resteasy-jackson + org.openapitools + jackson-databind-nullable + 0.2.6 io.quarkus - quarkus-arc + quarkus-config-yaml io.quarkus - quarkus-resteasy-multipart + quarkus-arc io.quarkus @@ -80,25 +82,6 @@ - - org.apache.maven.plugins - maven-scm-plugin - 1.11.2 - - - - initialize - - checkout - - - scm:git:https://github.com/redhat-appdev-practice/openapi-generator-quarkus-templates.git - templates - connection - - - - org.apache.maven.plugins maven-clean-plugin @@ -110,16 +93,13 @@ ${project.basedir}/target - - ${project.basedir}/templates - openapi-generator-maven-plugin org.openapitools - 5.1.1 + 7.1.0 generate-sources @@ -135,7 +115,6 @@ ${project.basedir} false ${openapi_app_contract_uri} - ${project.basedir}/templates java8 ${package}.models diff --git a/src/main/resources/archetype-resources/src/main/resources/application.properties b/src/main/resources/archetype-resources/src/main/resources/application.yaml similarity index 54% rename from src/main/resources/archetype-resources/src/main/resources/application.properties rename to src/main/resources/archetype-resources/src/main/resources/application.yaml index bd595f4..0b133ab 100644 --- a/src/main/resources/archetype-resources/src/main/resources/application.properties +++ b/src/main/resources/archetype-resources/src/main/resources/application.yaml @@ -1,4 +1,6 @@ #set( $symbol_pound = '#' ) #set( $symbol_dollar = '$' ) #set( $symbol_escape = '\' ) -quarkus.oidc.auth-server-url=https://oidc.example.com/auth/realm/client \ No newline at end of file +quarkus: + rest: + path: /api/v1 From d1e0a813112c510946e3da5a72ab33385fb9a761 Mon Sep 17 00:00:00 2001 From: Deven Phillips Date: Sun, 9 Mar 2025 13:05:05 +0000 Subject: [PATCH 2/3] Update Maven Publish Workflow --- .github/workflows/maven.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 3648f06..fece446 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -4,20 +4,20 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4.2.2 with: ref: trunk - name: Cache local Maven repository - uses: actions/cache@v2 + uses: actions/cache@v3.4.3 with: path: ~/.m2/repository key: ${{ runner.os }}-maven restore-keys: ${{ runner.os }}-maven - name: Set up JBoss Staging Repository - uses: actions/setup-java@v2 + uses: actions/setup-java@v4.7.0 with: - java-version: '17' - distribution: 'adopt' + java-version: '21' + distribution: 'temurin' server-id: jboss-staging server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD From 566fc5d6a70177e4fe3c76f195a3d0aa93643a8b Mon Sep 17 00:00:00 2001 From: Deven Phillips Date: Sun, 9 Mar 2025 13:39:29 -0400 Subject: [PATCH 3/3] Make nexus URI configurable --- .github/workflows/maven.yml | 27 +++++++++++++++++++-------- pom.xml | 32 ++++++++++++++------------------ 2 files changed, 33 insertions(+), 26 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 3648f06..3fd2d7f 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,24 +1,35 @@ name: Publish package to the Maven Central Repository -on: workflow_dispatch +on: + workflow_dispatch: {} + workflow_call: + inputs: + staging_url: + description: Which Nexus server should this workflow publish to + default: https://repository.jboss.org/nexus/ + required: true + type: choice + options: + - https://repository.jboss.org/nexus/ + - https://origin-repository-nx3.stage.jboss.org/nexus3/repository/releases/ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4.2.2 with: ref: trunk - name: Cache local Maven repository - uses: actions/cache@v2 + uses: actions/cache@v3.4.3 with: path: ~/.m2/repository key: ${{ runner.os }}-maven restore-keys: ${{ runner.os }}-maven - name: Set up JBoss Staging Repository - uses: actions/setup-java@v2 + uses: actions/setup-java@v4.7.0 with: - java-version: '17' - distribution: 'adopt' - server-id: jboss-staging + java-version: '21' + distribution: 'temurin' + server-id: ${{ inputs.repository }} server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - name: Set Git User Info @@ -27,7 +38,7 @@ jobs: git config --global user.name "GitHub Actions" - name: Maven Release run: | - mvn -B release:prepare release:perform -Dpassword="${{ github.token }}" -DtagNameFormat="r@{project.version}" + mvn -B release:prepare release:perform -Dnexus.staging.url="${{ staging_url }} -Dpassword="${{ github.token }}" -DtagNameFormat="r@{project.version}" env: MAVEN_USERNAME: ${{ secrets.NEXUS_USER }} MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} diff --git a/pom.xml b/pom.xml index c86369c..0d82746 100644 --- a/pom.xml +++ b/pom.xml @@ -12,6 +12,10 @@ OpenAPI And Quarkus Bootstrap Archetype https://github.com/redhat-appdev-practice/openapi-quarkus-archetype + + https://repository.jboss.org/nexus/ + + @@ -62,24 +66,16 @@ nexus-staging-maven-plugin 1.6.8 true - - jboss-staging - https://repository.jboss.org/nexus/ - 2161b7b8da0080 - true - - - - - com.thoughtworks.xstream - xstream - 1.4.15 - - + + + + jboss-staging + ${nexus.staging.url} + 2161b7b8da0080 + true + + +