mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Valery Kharseko
3 hours ago d9d626c0d2d932b664fd7893673af83e96cd68e9
[#325] Upgrade Central publishing plugin and remove Maven 3.9 pin (#1278)

Fixes OpenIdentityPlatform/commons#325.

Follows #1187 and OpenIdentityPlatform/commons#388.

Upgrade `org.sonatype.central:central-publishing-maven-plugin` from
0.11.0 to 0.12.0 and remove the Maven 3.9.16 installation step
introduced by #1187. Releases use the runner's Maven again.

Version 0.12.0 removes the local-repository metadata, tracking files,
and locks that Maven 3.10 writes into the staging directory, preventing
Central's “Bundle has content that does NOT have a .pom file” rejection.
See the [official release
notes](https://central.sonatype.org/publish/publish-portal-maven/#0120-13-oct-2026)
and [upstream
fix](https://github.com/sonatype-nexus-community/central-publishing-maven-plugin/pull/3).

Validation:
- POM XML and workflow YAML parse; `git diff --check` passes.
- Parent POM staging with Maven 3.10.0 / JDK 11, using a temporary
release-version copy, dummy credentials, and `deploy -N
-DskipUpload=true` completed successfully. The bundle contains exactly
the parent POM and its four checksums, with no Maven metadata, tracking
files, or locks. Nothing was uploaded to Central.

The full reactor and actual release workflow were not run.
2 files modified
13 ■■■■■ changed files
.github/workflows/release.yml 11 ●●●●● patch | view | raw | blame | history
pom.xml 2 ●●●●● patch | view | raw | blame | history
.github/workflows/release.yml
@@ -62,17 +62,6 @@
          server-id: ossrh
          server-username: MAVEN_USERNAME
          server-password: MAVEN_PASSWORD
      # Maven 3.10 leaves maven-metadata-local.xml and _remote.repositories in the
      # central-publishing staging directory, and Maven Central rejects the bundle.
      - name: Set up Maven 3.9
        env:
          MAVEN_VERSION: 3.9.16
          MAVEN_SHA512: 831a8591fe20c8243b1dbe7d71e3244f31d1665b0804b2e825e38cbbe5ce0cafb8338851f90780735568773e0a6cd07bbec107cda0b896b008b861075358b6f6
        run: |
          curl -fsSL --retry 5 -o "$RUNNER_TEMP/maven.tar.gz" "https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz"
          echo "$MAVEN_SHA512  $RUNNER_TEMP/maven.tar.gz" | sha512sum -c -
          tar xzf "$RUNNER_TEMP/maven.tar.gz" -C "$RUNNER_TEMP"
          echo "$RUNNER_TEMP/apache-maven-$MAVEN_VERSION/bin" >> "$GITHUB_PATH"
      - name: Cache Maven packages
        uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
        with:
pom.xml
@@ -342,7 +342,7 @@
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.11.0</version>
                <version>0.12.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>ossrh</publishingServerId>