diff --git a/.github/workflows/build_sonar_verify.yml b/.github/workflows/build_sonar_verify.yml deleted file mode 100644 index b3598aa0..00000000 --- a/.github/workflows/build_sonar_verify.yml +++ /dev/null @@ -1,95 +0,0 @@ - -name: Sonar verify -on: - workflow_run: - workflows: [Maven verify] - types: [completed] -jobs: - sonar_pr: - if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' }} - runs-on: ubuntu-latest - steps: - - name: Download PR artifact - uses: dawidd6/action-download-artifact@v7 - with: - workflow: Maven verify - run_id: ${{ github.event.workflow_run.id }} - name: PR_NUMBER - - - name: Read PR_NUMBER.txt - id: pr_number - uses: juliangruber/read-file-action@v1 - with: - path: ./PR_NUMBER.txt - - - name: Request GitHub API for PR data - uses: octokit/request-action@v2.x - id: get_pr_data - with: - route: GET /repos/{full_name}/pulls/{number} - number: ${{ steps.pr_number.outputs.content }} - full_name: ${{ github.event.repository.full_name }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - repository: ${{ github.event.workflow_run.head_repository.full_name }} - ref: ${{ github.event.workflow_run.head_branch }} - - - name: Checkout base branch - if: github.event.workflow_run.event == 'pull_request' - run: | - git remote add upstream ${{ github.event.repository.clone_url }} - git fetch upstream - git checkout -B ${{ fromJson(steps.get_pr_data.outputs.data).base.ref }} upstream/${{ fromJson(steps.get_pr_data.outputs.data).base.ref }} - git checkout ${{ github.event.workflow_run.head_branch }} - git clean -ffdx && git reset --hard HEAD - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'adopt' - cache: 'maven' - - name: Cache SonarCloud packages - uses: actions/cache@v4 - with: - path: ~/.sonar/cache - key: ${{ runner.os }}-sonar - restore-keys: ${{ runner.os }}-sonar - - name: Cache Maven packages - uses: actions/cache@v4 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Sonar analysis - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.scm.revision=${{ github.event.workflow_run.head_sha }} -Dsonar.pullrequest.key=${{ fromJson(steps.get_pr_data.outputs.data).number }} -Dsonar.pullrequest.branch=${{ fromJson(steps.get_pr_data.outputs.data).head.ref }} -Dsonar.pullrequest.base=${{ fromJson(steps.get_pr_data.outputs.data).base.ref }} -Dsonar.projectKey=io.github.mivek:metarParser - - sonar_push: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' && github.event.workflow_run.head_repository.full_name == github.event.repository.full_name }} - steps: - - uses: actions/checkout@v4 - with: - repository: ${{ github.event.workflow_run.head_repository.full_name }} - ref: ${{ github.event.workflow_run.head_branch }} - fetch-depth: 0 - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'adopt' - cache: 'maven' - - - name: Sonar analysis - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=io.github.mivek:metarParser -Dsonar.scm.revision=${{ github.event.workflow_run.head_sha }} -Dsonar.branch.name=${{ github.event.workflow_run.head_branch }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 54036d5c..b6ccdc2a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,9 +31,9 @@ jobs: distribution: 'adopt' java-version: '17' cache: 'maven' - server-id: ossrh - server-username: SONATYPE_USERNAME - server-password: SONATYPE_PASSWORD + server-id: central + server-username: MAVEN_CENTRAL_USERNAME + server-password: MAVEN_CENTRAL_PASSWORD gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} gpg-passphrase: MAVEN_GPG_PASSPHRASE - name: Install semantic-release dependencies @@ -42,6 +42,6 @@ jobs: run: npx semantic-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} + MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} \ No newline at end of file diff --git a/.github/workflows/sonar-master.yml b/.github/workflows/sonar-master.yml deleted file mode 100644 index fcb42520..00000000 --- a/.github/workflows/sonar-master.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: CI - main -on: - push: - branches: - - main -jobs: - build: - name: Build and analyze - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'adopt' - cache: 'maven' - - name: Cache SonarCloud packages - uses: actions/cache@v4 - with: - path: ~/.sonar/cache - key: ${{ runner.os }}-sonar - restore-keys: ${{ runner.os }}-sonar - - name: Cache Maven packages - uses: actions/cache@v4 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Build and analyze - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=io.github.mivek:metarParser diff --git a/.settings.xml b/.settings.xml index acbca70c..f0853c76 100644 --- a/.settings.xml +++ b/.settings.xml @@ -3,22 +3,13 @@ - ossrh - ${env.SONATYPE_USERNAME} - ${env.SONATYPE_PASSWORD} + central + ${env.MAVEN_CENTRAL_USERNAME} + ${env.MAVEN_CENTRAL_PASSWORD} gpg.passphrase ${env.MAVEN_GPG_PASSPHRASE} - - - - ossrh - - false - - - diff --git a/metarParser-commons/pom.xml b/metarParser-commons/pom.xml index b3bc35a1..7e438d4a 100644 --- a/metarParser-commons/pom.xml +++ b/metarParser-commons/pom.xml @@ -10,6 +10,7 @@ 4.0.0 metarParser-commons + metarParser-commons Module containing utility classes diff --git a/metarParser-entities/pom.xml b/metarParser-entities/pom.xml index dec1babc..23df4f0e 100644 --- a/metarParser-entities/pom.xml +++ b/metarParser-entities/pom.xml @@ -10,6 +10,7 @@ 4.0.0 metarParser-entities + metarParser-entities Module containing the model of the application. diff --git a/metarParser-parsers/pom.xml b/metarParser-parsers/pom.xml index bf3cd13a..507633e8 100644 --- a/metarParser-parsers/pom.xml +++ b/metarParser-parsers/pom.xml @@ -10,6 +10,8 @@ 4.0.0 metarParser-parsers + metarParser-parsers + Module containing the parsers. diff --git a/metarParser-services/pom.xml b/metarParser-services/pom.xml index 109082b1..266c9e03 100644 --- a/metarParser-services/pom.xml +++ b/metarParser-services/pom.xml @@ -8,7 +8,7 @@ 2.17.1 4.0.0 - + metarParser-services metarParser-services diff --git a/metarParser-spi/pom.xml b/metarParser-spi/pom.xml index 792b68da..d8d97fe6 100644 --- a/metarParser-spi/pom.xml +++ b/metarParser-spi/pom.xml @@ -10,6 +10,7 @@ 4.0.0 metarParser-spi + metarParser-spi 0.96 diff --git a/pom.xml b/pom.xml index e43c057d..6ffb2b84 100644 --- a/pom.xml +++ b/pom.xml @@ -64,7 +64,6 @@ 3.21.0 3.3.1 3.5.3 - 1.7.0 1.14.0 1.2.3 1.19.5 @@ -288,11 +287,11 @@ release - ossrh + central https://oss.sonatype.org/content/repositories/snapshots - ossrh + central https://oss.sonatype.org/service/local/staging/deploy/maven2/ @@ -339,15 +338,14 @@ - org.sonatype.plugins - nexus-staging-maven-plugin - ${nexus-staging-maven-plugin.version} - true - - ossrh - https://oss.sonatype.org/ - true - + org.sonatype.central + central-publishing-maven-plugin + 0.8.0 + true + + central + true + org.apache.maven.plugins