From a73e7e5c175dd873c9432c07547765382b0ee606 Mon Sep 17 00:00:00 2001 From: Roberto Cortez Date: Wed, 16 Oct 2024 15:39:18 +0100 Subject: [PATCH] Fix CI Build --- .github/workflows/build.yml | 15 +++++++++++++-- README.adoc | 2 +- pom.xml | 12 ++++++++++++ testsuite/tck/pom.xml | 3 ++- to-jakarta.sh | 25 ------------------------- 5 files changed, 28 insertions(+), 29 deletions(-) delete mode 100644 to-jakarta.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0882ab52..ea4596f8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - jakarta paths-ignore: - '.gitignore' - 'CODEOWNERS' @@ -80,12 +79,24 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + - uses: actions/setup-java@v4 with: + distribution: 'temurin' + java-version: 11 + cache: 'maven' + cache-dependency-path: '**/pom.xml' + + - name: build with docs and coverage + run: mvn verify -Pcoverage javadoc:javadoc + + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' java-version: 17 - name: sonar env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} SONAR_TOKEN: ${{secrets.SONAR_TOKEN}} - run: mvn -B verify --file pom.xml -Pcoverage javadoc:javadoc sonar:sonar -Dsonar.projectKey=smallrye_smallrye-jwt -Dsonar.token=$SONAR_TOKEN + run: mvn sonar:sonar -Psonar -Dsonar.token=${{secrets.SONAR_TOKEN}} diff --git a/README.adoc b/README.adoc index 246c196d..07b1c85a 100644 --- a/README.adoc +++ b/README.adoc @@ -1,7 +1,7 @@ :microprofile-jwt: https://github.com/eclipse/microprofile-jwt-auth/ :mp-jwt-name: Eclipse MicroProfile JWT RBAC :ci: https://github.com/smallrye/smallrye-jwt/actions?query=workflow%3A%22SmallRye+Build%22 -:sonar: https://sonarcloud.io/dashboard?id=smallrye_smallrye-jwt +:sonar: https://sonarcloud.io/dashboard?id=io.smallrye%3Asmallrye-jwt image:https://github.com/smallrye/smallrye-jwt/workflows/SmallRye%20Build/badge.svg?branch=main[link={ci}] image:https://sonarcloud.io/api/project_badges/measure?project=smallrye_smallrye-jwt&metric=alert_status["Quality Gate Status", link={sonar}] diff --git a/pom.xml b/pom.xml index 50e06d8d..81ca699f 100644 --- a/pom.xml +++ b/pom.xml @@ -212,5 +212,17 @@ release + + sonar + + SmallRye JWT + io.smallrye:smallrye-jwt + ${project.artifactId} + + + ${maven.multiModuleProjectDirectory}/coverage/target/site/jacoco-aggregate/jacoco.xml + + + diff --git a/testsuite/tck/pom.xml b/testsuite/tck/pom.xml index 29b5528c..0d5d71e7 100644 --- a/testsuite/tck/pom.xml +++ b/testsuite/tck/pom.xml @@ -114,9 +114,10 @@ microprofile-jwt-auth-tck ${version.eclipse.microprofile.jwt} test-jar + tests false + **/*.xml ${project.build.directory}/tck-suite - **/tck-base-suite.xml diff --git a/to-jakarta.sh b/to-jakarta.sh deleted file mode 100644 index 4d4fec40..00000000 --- a/to-jakarta.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash - -# move to jakarta parent -find . -type f -name 'pom.xml' -exec sed -i 's/smallrye-parent/smallrye-jakarta-parent/g' {} + -# java sources -find . -type f -name '*.java' -exec sed -i 's/javax./jakarta./g' {} + -find . -type f -name '*.java' -exec sed -i 's/jakarta.crypto./javax.crypto./g' {} + -find . -type f -name '*.java' -exec sed -i 's/jakarta.security.auth./javax.security.auth./g' {} + -find . -type f -name '*.java' -exec sed -i 's/jakarta.net.ssl./javax.net.ssl./g' {} + -# service loader files -find . -path "*/src/main/resources/META-INF/services/javax*" | sed -e 'p;s/javax/jakarta/g' | xargs -n2 git mv - -mvn build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.nextMajorVersion}.0.1-SNAPSHOT -Pcoverage - -mvn versions:update-property -Dproperty=version.jakarta.servlet.api -DnewVersion=[5.0.0] -N -mvn versions:update-property -Dproperty=version.jakarta.security.enterprise.api -DnewVersion=[2.0.0] -N -mvn versions:update-property -Dproperty=version.smallrye.config -DnewVersion=[3.0.0] -N -mvn versions:update-property -Dproperty=version.eclipse.microprofile.jwt -DnewVersion=[2.0] -N -mvn versions:update-property -Dproperty=version.microprofile.config -DnewVersion=[3.0] -N -mvn versions:set-property -Dproperty=artifactId.arquillian.jetty -DnewVersion=arquillian-jetty-embedded-11 -N -mvn versions:update-property -Dproperty=version.jetty -DnewVersion=[11.0.7] -N -mvn versions:set-property -Dproperty=version.resteasy -DnewVersion=6.0.0.Final -N -mvn versions:set-property -Dproperty=groupId.resteasy.client -DnewVersion=org.jboss.resteasy.microprofile -N -mvn versions:set-property -Dproperty=artifactId.resteasy.client -DnewVersion=microprofile-rest-client -N -mvn versions:set-property -Dproperty=version.resteasy.client -DnewVersion=2.0.0.Beta1 -N