diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index fd9d051..406e228 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -53,7 +53,7 @@ jobs: distribution: 'temurin' java-version: ${{ matrix.jdk }} # generate settings.xml with the correct values - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml + server-id: sonatype-central-portal # Value of the distributionManagement/repository/id field of the pom.xml server-username: MAVEN_USERNAME # env variable for username in deploy server-password: MAVEN_PASSWORD # env variable for token in deploy @@ -64,8 +64,8 @@ jobs: if [ "${{ matrix.isMainBuildEnv }}" = "true" ]; then echo "MVN_ADDITIONAL_OPTS=-Dsonar.projectKey=Netcentric_aem-cloud-validator -Dsonar.organization=netcentric -Dsonar.host.url=https://sonarcloud.io -Pjacoco-report -Dsonar.scanner.skipJreProvisioning=true" >> $GITHUB_ENV if [ "${{github.ref}}" = "refs/heads/main" ] && [ "${{github.event_name}}" = "push" ]; then - echo "MAVEN_USERNAME=${{ secrets.OSSRH_TOKEN_USER }}" >> $GITHUB_ENV - echo "MAVEN_PASSWORD=${{ secrets.OSSRH_TOKEN_PASSWORD }}" >> $GITHUB_ENV + echo "MAVEN_USERNAME: ${{ secrets.SONATYPE_CENTRAL_TOKEN_USER }}" >> $GITHUB_ENV + echo "MAVEN_PASSWORD: ${{ secrets.SONATYPE_CENTRAL_TOKEN_PASSWORD }}" >> $GITHUB_ENV echo "MVN_GOAL=clean deploy org.sonarsource.scanner.maven:sonar-maven-plugin:5.5.0.6356:sonar" >> $GITHUB_ENV echo "STEP_NAME_SUFFIX=(Deploys to OSSRH)" >> $GITHUB_ENV else diff --git a/pom.xml b/pom.xml index 24aec0b..3d897f6 100644 --- a/pom.xml +++ b/pom.xml @@ -40,12 +40,12 @@ - ossrh - https://oss.sonatype.org/content/repositories/snapshots + sonatype-central-portal + https://central.sonatype.com/repository/maven-snapshots - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ + sonatype-central-portal + https://repo.maven.apache.org/maven2 @@ -56,6 +56,14 @@ ${java.target.version} UTF-8 + 0.9.4 + + true + automatic + true + sonatype-cp + njord:template:release-sca + njord:template:snapshot @@ -125,6 +133,14 @@ + + + + eu.maveniverse.maven.njord + extension3 + ${njord.version} + + @@ -184,11 +200,6 @@ maven-gpg-plugin 3.2.8 - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.8 - org.codehaus.mojo license-maven-plugin @@ -203,6 +214,11 @@ maven-invoker-plugin 3.9.1 + + eu.maveniverse.maven.plugins + njord + ${njord.version} + @@ -281,21 +297,6 @@ @{prefix} prepare release @{releaseLabel} [skip ci] - - org.sonatype.plugins - nexus-staging-maven-plugin - true - - ossrh - https://oss.sonatype.org/ - - false - - 15 - true - - - org.codehaus.mojo license-maven-plugin