From 33e320f2bafb77c106d688044ae15918e18d92a3 Mon Sep 17 00:00:00 2001 From: redcatbaer Date: Sun, 15 Jun 2025 07:50:34 +0200 Subject: [PATCH 1/8] Added central URLs explicitly to prevent lookup of distribution management. --- doc/changes/changes_4.2.0.md | 2 +- parent/pom.xml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/changes/changes_4.2.0.md b/doc/changes/changes_4.2.0.md index 15b0b9a1..97347724 100644 --- a/doc/changes/changes_4.2.0.md +++ b/doc/changes/changes_4.2.0.md @@ -1,4 +1,4 @@ -# OpenFastTrace 4.2.0, released 2025-06-14 +# OpenFastTrace 4.2.0, released 2025-06-15 Code name: Markdown code blocks diff --git a/parent/pom.xml b/parent/pom.xml index 86f0b7f7..b67796c2 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -652,6 +652,8 @@ true central + https://central.sonatype.com + https://central.sonatype.com false validated Manual deployment of OpenFastTrace From 8931565ddf01fba7590089dcae65fcb7754e04b3 Mon Sep 17 00:00:00 2001 From: redcatbaer Date: Sun, 15 Jun 2025 10:31:31 +0200 Subject: [PATCH 2/8] Readded distribution management. Does not work without. --- openfasttrace-mc-deployable-parent/pom.xml | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/openfasttrace-mc-deployable-parent/pom.xml b/openfasttrace-mc-deployable-parent/pom.xml index bb858757..a3129081 100644 --- a/openfasttrace-mc-deployable-parent/pom.xml +++ b/openfasttrace-mc-deployable-parent/pom.xml @@ -56,8 +56,37 @@ It is maintained separately from the main parent POM for the following reasons: + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.4 + + true + + + + + + central + Maven Central + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + + central + Maven Central Snapshots + https://s01.oss.sonatype.org/content/repositories/snapshots/ + + From 55709ddea746d7e4ea83d88e94d3503628f4a904 Mon Sep 17 00:00:00 2001 From: kaklakariada Date: Sun, 22 Jun 2025 11:27:12 +0200 Subject: [PATCH 3/8] Fix Maven Central deployment --- .github/workflows/release.yml | 2 +- api/pom.xml | 8 ---- core/pom.xml | 8 ---- doc/developer_guide.md | 39 ++++++++++++++++ exporter/common/pom.xml | 8 ---- exporter/specobject/pom.xml | 8 ---- importer/lightweightmarkup/pom.xml | 8 ---- importer/markdown/pom.xml | 8 ---- importer/restructuredtext/pom.xml | 8 ---- importer/specobject/pom.xml | 8 ---- importer/tag/pom.xml | 8 ---- importer/xmlparser/pom.xml | 8 ---- importer/zip/pom.xml | 8 ---- openfasttrace-mc-deployable-parent/pom.xml | 25 +---------- parent/pom.xml | 52 +++++----------------- pom.xml | 13 ++++++ product/pom.xml | 4 -- reporter/aspec/pom.xml | 8 ---- reporter/html/pom.xml | 8 ---- reporter/plaintext/pom.xml | 8 ---- 20 files changed, 65 insertions(+), 182 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 71a7c65d..4ef42a6e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,7 +51,7 @@ jobs: - name: Publish to Maven Central Repository if: ${{ !inputs.skip-deploy-maven-central }} - run: mvn --batch-mode deploy -Pcentral-publishing -DdeploymentName="Deployed OFT via GitHub workflow release.yml" + run: mvn --batch-mode deploy -Pcentral-publishing -DautoPublish=true -DdeploymentName="Deployed OFT via GitHub workflow release.yml" env: MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_PORTAL_USERNAME }} MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PORTAL_TOKEN }} diff --git a/api/pom.xml b/api/pom.xml index 36c5499e..e0ee8615 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -13,12 +13,4 @@ ${reproducible.build.timestamp} - - - - org.sonatype.central - central-publishing-maven-plugin - - - diff --git a/core/pom.xml b/core/pom.xml index fe721aa6..de8bb4ec 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -24,12 +24,4 @@ test - - - - org.sonatype.central - central-publishing-maven-plugin - - - diff --git a/doc/developer_guide.md b/doc/developer_guide.md index b1c72bdc..1a062282 100644 --- a/doc/developer_guide.md +++ b/doc/developer_guide.md @@ -260,3 +260,42 @@ As you can see in the table above, not all modules are intended to be deployed o The base POM is `openfasttrace-parent`, it mainly contains common dependencies and build configuration. On top of that, `openfasttrace-mc-deployable-parent` adds signing and Maven central deployment. This structure ensures that only user-facing components are published to Maven Central while keeping internal development tools and build infrastructure private. + +## Debugging Maven Central Deployment + +### Build Deployment Bundle + +Build deployment bundle to check if the expected modules are included: + +```sh +mvn -T1C deploy -Pcentral-publishing -DskipPublishing=true -DskipTests +``` + +This will build `central-bundle.zip` in one of the modules. Find it with `find . -name "central-bundle.zip"`, then check it's content with `unzip -l api/target/central-publishing/central-bundle.zip`. + +Ensure that neither `testutil` nor any parent module is included. + +### Verify Deployment Preconditions + +Configure Maven Central credentials in `~/.m2/settings.xml`: + +```xml + + + + central + user + password + + + + +``` + +The following command will upload the bundle to Maven Central without publishing: + +```sh +mvn -T1C clean deploy -Pcentral-publishing -DskipPublishing=true -DautoPublish=false -DskipTests +``` + +Then go to https://central.sonatype.com/publishing/deployments and check that the deployment is marked as "validated" and that the expected components are included. Don't forget to click the "Drop" button to avoid accidentally publishing the release. diff --git a/exporter/common/pom.xml b/exporter/common/pom.xml index 6734a700..52b9e58a 100644 --- a/exporter/common/pom.xml +++ b/exporter/common/pom.xml @@ -24,12 +24,4 @@ test - - - - org.sonatype.central - central-publishing-maven-plugin - - - diff --git a/exporter/specobject/pom.xml b/exporter/specobject/pom.xml index b3c24cc5..39b20762 100644 --- a/exporter/specobject/pom.xml +++ b/exporter/specobject/pom.xml @@ -28,12 +28,4 @@ test - - - - org.sonatype.central - central-publishing-maven-plugin - - - diff --git a/importer/lightweightmarkup/pom.xml b/importer/lightweightmarkup/pom.xml index 45739b71..37fe269b 100644 --- a/importer/lightweightmarkup/pom.xml +++ b/importer/lightweightmarkup/pom.xml @@ -29,12 +29,4 @@ test - - - - org.sonatype.central - central-publishing-maven-plugin - - - diff --git a/importer/markdown/pom.xml b/importer/markdown/pom.xml index 3ff3260a..42c96065 100644 --- a/importer/markdown/pom.xml +++ b/importer/markdown/pom.xml @@ -28,12 +28,4 @@ test - - - - org.sonatype.central - central-publishing-maven-plugin - - - diff --git a/importer/restructuredtext/pom.xml b/importer/restructuredtext/pom.xml index c897bf21..4f66ed9d 100644 --- a/importer/restructuredtext/pom.xml +++ b/importer/restructuredtext/pom.xml @@ -28,12 +28,4 @@ test - - - - org.sonatype.central - central-publishing-maven-plugin - - - diff --git a/importer/specobject/pom.xml b/importer/specobject/pom.xml index 113f8971..91dbab26 100644 --- a/importer/specobject/pom.xml +++ b/importer/specobject/pom.xml @@ -28,12 +28,4 @@ test - - - - org.sonatype.central - central-publishing-maven-plugin - - - diff --git a/importer/tag/pom.xml b/importer/tag/pom.xml index 390f36be..165ed118 100644 --- a/importer/tag/pom.xml +++ b/importer/tag/pom.xml @@ -24,12 +24,4 @@ test - - - - org.sonatype.central - central-publishing-maven-plugin - - - diff --git a/importer/xmlparser/pom.xml b/importer/xmlparser/pom.xml index e2d6200f..b8723191 100644 --- a/importer/xmlparser/pom.xml +++ b/importer/xmlparser/pom.xml @@ -24,12 +24,4 @@ test - - - - org.sonatype.central - central-publishing-maven-plugin - - - diff --git a/importer/zip/pom.xml b/importer/zip/pom.xml index 0c235a82..c82ff929 100644 --- a/importer/zip/pom.xml +++ b/importer/zip/pom.xml @@ -24,12 +24,4 @@ test - - - - org.sonatype.central - central-publishing-maven-plugin - - - diff --git a/openfasttrace-mc-deployable-parent/pom.xml b/openfasttrace-mc-deployable-parent/pom.xml index a3129081..f3cf3559 100644 --- a/openfasttrace-mc-deployable-parent/pom.xml +++ b/openfasttrace-mc-deployable-parent/pom.xml @@ -37,6 +37,7 @@ It is maintained separately from the main parent POM for the following reasons: true central + false false validated Manual deployment of OpenFastTrace @@ -56,37 +57,13 @@ It is maintained separately from the main parent POM for the following reasons: - org.apache.maven.plugins maven-deploy-plugin 3.1.4 - - true - - - - - central - Maven Central - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ - - - central - Maven Central Snapshots - https://s01.oss.sonatype.org/content/repositories/snapshots/ - - diff --git a/parent/pom.xml b/parent/pom.xml index b67796c2..e7cbeaa7 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -416,8 +416,7 @@ true true - - ${test.args} + ${test.args} @@ -450,7 +449,7 @@ - 3.9.9 + 3.8.7 @@ -518,6 +517,15 @@ versions-maven-plugin 2.18.0 + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.4 + + true + + @@ -586,16 +594,6 @@ - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - @@ -645,34 +643,6 @@ - - org.sonatype.central - central-publishing-maven-plugin - 0.7.0 - true - - central - https://central.sonatype.com - https://central.sonatype.com - false - validated - Manual deployment of OpenFastTrace - - - - org.apache.maven.plugins - maven-gpg-plugin - 3.2.7 - - - sign-artifacts - verify - - sign - - - - diff --git a/pom.xml b/pom.xml index 6c8094b1..5a2f972c 100644 --- a/pom.xml +++ b/pom.xml @@ -35,4 +35,17 @@ reporter/aspec testutil + + + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.4 + + true + + + + diff --git a/product/pom.xml b/product/pom.xml index 2ead3e92..18457c00 100644 --- a/product/pom.xml +++ b/product/pom.xml @@ -123,10 +123,6 @@ - - org.sonatype.central - central-publishing-maven-plugin - diff --git a/reporter/aspec/pom.xml b/reporter/aspec/pom.xml index 19464e96..f47a75f3 100644 --- a/reporter/aspec/pom.xml +++ b/reporter/aspec/pom.xml @@ -28,12 +28,4 @@ test - - - - org.sonatype.central - central-publishing-maven-plugin - - - diff --git a/reporter/html/pom.xml b/reporter/html/pom.xml index 0e67dd50..288f2a61 100644 --- a/reporter/html/pom.xml +++ b/reporter/html/pom.xml @@ -24,12 +24,4 @@ test - - - - org.sonatype.central - central-publishing-maven-plugin - - - diff --git a/reporter/plaintext/pom.xml b/reporter/plaintext/pom.xml index 72cf8070..a0719c1d 100644 --- a/reporter/plaintext/pom.xml +++ b/reporter/plaintext/pom.xml @@ -24,12 +24,4 @@ test - - - - org.sonatype.central - central-publishing-maven-plugin - - - From 11b76d0e62e21c8242d801dae83317e44ac4ebd2 Mon Sep 17 00:00:00 2001 From: kaklakariada Date: Sun, 22 Jun 2025 11:36:34 +0200 Subject: [PATCH 4/8] Allow configuring auto-publish for MC release --- .github/workflows/release.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4ef42a6e..9150c923 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,6 +8,11 @@ on: required: true type: boolean default: false + maven-central-auto-publish: + description: "Automatically publish to Maven Central" + required: true + type: boolean + default: true jobs: release: @@ -51,7 +56,11 @@ jobs: - name: Publish to Maven Central Repository if: ${{ !inputs.skip-deploy-maven-central }} - run: mvn --batch-mode deploy -Pcentral-publishing -DautoPublish=true -DdeploymentName="Deployed OFT via GitHub workflow release.yml" + run: | + mvn --batch-mode deploy -Pcentral-publishing \ + -DskipPublishing=false + -DautoPublish=${{ inputs.maven-central-auto-publish }} \ + -DdeploymentName="Auto-deploy OFT via release.yml" env: MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_PORTAL_USERNAME }} MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PORTAL_TOKEN }} From de37e0fd3db577b195168c4fb8c8ccf772f06ae2 Mon Sep 17 00:00:00 2001 From: kaklakariada Date: Sun, 22 Jun 2025 11:39:11 +0200 Subject: [PATCH 5/8] Cleanup --- parent/pom.xml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/parent/pom.xml b/parent/pom.xml index e7cbeaa7..06218e3b 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -594,8 +594,7 @@ - org.eclipse.m2e @@ -655,7 +654,4 @@ - From 28741ce64277bf5b6aaba0892247bddf7c7266de Mon Sep 17 00:00:00 2001 From: kaklakariada Date: Sun, 22 Jun 2025 11:43:16 +0200 Subject: [PATCH 6/8] Fix syntax of release script --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9150c923..cf3386de 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,7 +58,7 @@ jobs: if: ${{ !inputs.skip-deploy-maven-central }} run: | mvn --batch-mode deploy -Pcentral-publishing \ - -DskipPublishing=false + -DskipPublishing=false \ -DautoPublish=${{ inputs.maven-central-auto-publish }} \ -DdeploymentName="Auto-deploy OFT via release.yml" env: From 9988c49dee9b6489434cd5c42ff69c4db0294b32 Mon Sep 17 00:00:00 2001 From: kaklakariada Date: Sun, 22 Jun 2025 11:45:23 +0200 Subject: [PATCH 7/8] Fix broken link --- doc/developer_guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/developer_guide.md b/doc/developer_guide.md index 1a062282..b2c75c12 100644 --- a/doc/developer_guide.md +++ b/doc/developer_guide.md @@ -40,7 +40,7 @@ The list below shows all build time dependencies in alphabetical order. Note tha | [Apache Maven](https://maven.apache.org/) | Build tool | Apache License 2.0 | | [Equals Verifier](https://github.com/jqno/equalsverifier) | Automatic contract checker for `equals()` and `hash()` | Apache License 2.0 | | [Hamcrest Auto Matcher](https://github.com/itsallcode/hamcrest-auto-matcher) | Speed-up for building Hamcrest matchers | GNU General Public License V3 | -| [JUnit](https://junit.org/junit5) | Unit testing framework | Eclipse Public License 1.0 | +| [JUnit](https://junit.org) | Unit testing framework | Eclipse Public License 1.0 | | [Mockito](https://github.com/mockito/mockito) | Mocking framework | MIT License | | [JUnit5 System Extensions](https://github.com/itsallcode/junit5-system-extensions) | JUnit extension for testing `System.x` calls | Eclipse Public License 2.0 | From 10b140ce04d0a210b7da3b723387ce96a4883ab1 Mon Sep 17 00:00:00 2001 From: kaklakariada Date: Sun, 22 Jun 2025 12:03:16 +0200 Subject: [PATCH 8/8] Update release date --- doc/changes/changes_4.2.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changes/changes_4.2.0.md b/doc/changes/changes_4.2.0.md index 97347724..faf8b43d 100644 --- a/doc/changes/changes_4.2.0.md +++ b/doc/changes/changes_4.2.0.md @@ -1,4 +1,4 @@ -# OpenFastTrace 4.2.0, released 2025-06-15 +# OpenFastTrace 4.2.0, released 2025-06-22 Code name: Markdown code blocks