From f1dc0ec1f333170681dcc4a6d88450e02b6b87d8 Mon Sep 17 00:00:00 2001 From: redcatbaer Date: Sun, 15 Jun 2025 08:27:58 +0200 Subject: [PATCH 1/4] Fixed typo. --- .../2025/01/06/new_central_deployment.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 content/posts/2025/01/06/new_central_deployment.md diff --git a/content/posts/2025/01/06/new_central_deployment.md b/content/posts/2025/01/06/new_central_deployment.md new file mode 100644 index 0000000..978deac --- /dev/null +++ b/content/posts/2025/01/06/new_central_deployment.md @@ -0,0 +1,22 @@ +--- +title: "4.2.0, the release to Maven central that drove us mad" +date: "2025-06-15T15:14:00+01:00" +draft: false +author: Sebastian +--- + +To understand the rant that is about to follow, one must know that this year Sonatype changed the way releases are deployed to the Central repository (formerly known as Maven Central). + +Nothing wrong with doing that per se, since the old mechanism was quite clunky and I imagine, also caused some trouble on Sonatype's side. The announcement came end of 2024, and the deadline for the migration was the last of May 2025. So far so fair. + +Trouble starts with the fact that the new Maven plugin for the deployment has a zero in front, which is not what you would expect when you are supposed to use it for production. At the time of the release we had 0.7.0, which had a lot of its kinks already smoothed out, but the documentation was quite thin. + +Especially, it was not clear how the new plugin played together with the existing `maven-deploy-plugin`. And let me tell you, the setup is not straight forward. + +To make things worse, OFT is a pretty complicated multi-module Maven project, where most modules should be on the Central repository but at least one — namely the `testutils` — does not belong there. + +Excluding that one module turned out to be super finicky. Like jumping through a set of burning hoops while being blindfolded and having frozen turkey being fired at you from a dozen catapults. + +At the time I am writing this article, we still did not find a configuration that passes all Maven checks. It is a long and painful series of trial-and-error with long roundtrips. + +Anyway, we will keep pushing through. Stay tuned. From 0127f94fe197a5f320caa0590b15a563fa886a5e Mon Sep 17 00:00:00 2001 From: redcatbaer Date: Sun, 22 Jun 2025 14:26:32 +0200 Subject: [PATCH 2/4] Article about the new Maven Central deployment. --- .../posts/2025/01/06/new_central_deployment.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/content/posts/2025/01/06/new_central_deployment.md b/content/posts/2025/01/06/new_central_deployment.md index 978deac..e3362e6 100644 --- a/content/posts/2025/01/06/new_central_deployment.md +++ b/content/posts/2025/01/06/new_central_deployment.md @@ -1,22 +1,30 @@ --- title: "4.2.0, the release to Maven central that drove us mad" -date: "2025-06-15T15:14:00+01:00" +date: "2025-06-22T14:26:00+01:00" draft: false author: Sebastian --- +Although the feature set change for version 4.2.0 is not that big, that was the most painful release we had sofar. + To understand the rant that is about to follow, one must know that this year Sonatype changed the way releases are deployed to the Central repository (formerly known as Maven Central). -Nothing wrong with doing that per se, since the old mechanism was quite clunky and I imagine, also caused some trouble on Sonatype's side. The announcement came end of 2024, and the deadline for the migration was the last of May 2025. So far so fair. +Nothing wrong with doing that per se, since the old mechanism was quite clunky, and I imagine, also caused some trouble on Sonatype's side. The announcement came around the end of 2024, and the deadline for the migration was the last of May 2025. So far so fair. Trouble starts with the fact that the new Maven plugin for the deployment has a zero in front, which is not what you would expect when you are supposed to use it for production. At the time of the release we had 0.7.0, which had a lot of its kinks already smoothed out, but the documentation was quite thin. Especially, it was not clear how the new plugin played together with the existing `maven-deploy-plugin`. And let me tell you, the setup is not straight forward. +To give you an example, with the Maven Central deployment plugin it should be clear what the server URL of the central repository is. That could very well be hard-coded into the plugin as a default value. Unfortunately, while the `maven-deploy-plugin` doest not do the actual deployment anymore, it still requires configuring the repo URLs. + To make things worse, OFT is a pretty complicated multi-module Maven project, where most modules should be on the Central repository but at least one — namely the `testutils` — does not belong there. Excluding that one module turned out to be super finicky. Like jumping through a set of burning hoops while being blindfolded and having frozen turkey being fired at you from a dozen catapults. -At the time I am writing this article, we still did not find a configuration that passes all Maven checks. It is a long and painful series of trial-and-error with long roundtrips. +It took the combined efforts of Christoph and me, and a lot of exploring dead ends until we finally got it right. If you are interested in the solution, check [PR #464](https://github.com/itsallcode/openfasttrace/pull/464/files). + +I added a section about the [module structure](https://github.com/itsallcode/openfasttrace/blob/main/doc/developer_guide.md#module-overview) and what that means for the deployment to the developer guide, and Christoph contributed a section about [debugging the new Central deployment](https://github.com/itsallcode/openfasttrace/blob/main/doc/developer_guide.md#debugging-maven-central-deployment. + +In total, that release took us around a month until we had it ready. We improved a lot of documentation, updated dependencies, added support for new JavaScript extensions and added a feature that allows ignoring specification items inside Markdown code blocks. In the course of that last feature, we also added markers `oft:on|off` that allow excluding OFT parsing for selected text passages. -Anyway, we will keep pushing through. Stay tuned. +For more information, please check the [release letter of 4.2.0](https://github.com/itsallcode/openfasttrace/releases/tag/4.2.0). \ No newline at end of file From c534a9c648f9d48c6f78962eef23d6853c76155b Mon Sep 17 00:00:00 2001 From: redcatbaer Date: Sun, 22 Jun 2025 14:33:35 +0200 Subject: [PATCH 3/4] Added `apt-get update` to CI build script. --- .github/workflows/gh-pages.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 2351f38..e7d5477 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -20,7 +20,9 @@ jobs: fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - name: Setup Hugo - run: sudo apt install hugo + run: | + sudo apt-get update + sudo apt-get install hugo - name: Build run: hugo --minify From af6d7d5be0d04768d9abbc98cc41e909b7acc1ce Mon Sep 17 00:00:00 2001 From: redcatbaer Date: Sun, 22 Jun 2025 14:44:11 +0200 Subject: [PATCH 4/4] Added `apt-get update` to CI build script. --- .../posts/2025/01/06/new_central_deployment.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/content/posts/2025/01/06/new_central_deployment.md b/content/posts/2025/01/06/new_central_deployment.md index e3362e6..29cdba0 100644 --- a/content/posts/2025/01/06/new_central_deployment.md +++ b/content/posts/2025/01/06/new_central_deployment.md @@ -5,7 +5,9 @@ draft: false author: Sebastian --- -Although the feature set change for version 4.2.0 is not that big, that was the most painful release we had sofar. +Although the feature set change for version 4.2.0 is not that big, that was the most painful release we had so far. + +## The Challenge of the new Maven Central Deployment To understand the rant that is about to follow, one must know that this year Sonatype changed the way releases are deployed to the Central repository (formerly known as Maven Central). @@ -15,15 +17,21 @@ Trouble starts with the fact that the new Maven plugin for the deployment has a Especially, it was not clear how the new plugin played together with the existing `maven-deploy-plugin`. And let me tell you, the setup is not straight forward. -To give you an example, with the Maven Central deployment plugin it should be clear what the server URL of the central repository is. That could very well be hard-coded into the plugin as a default value. Unfortunately, while the `maven-deploy-plugin` doest not do the actual deployment anymore, it still requires configuring the repo URLs. +To give you an example, with the Maven Central deployment plugin it should be clear what the server URL of the central repository is. That could very well be hard-coded into the plugin as a default value. Unfortunately, while the `maven-deploy-plugin` does not do the actual deployment anymore, it still requires configuring the repo URLs. + +## Multi-module Deployments are Hard To make things worse, OFT is a pretty complicated multi-module Maven project, where most modules should be on the Central repository but at least one — namely the `testutils` — does not belong there. -Excluding that one module turned out to be super finicky. Like jumping through a set of burning hoops while being blindfolded and having frozen turkey being fired at you from a dozen catapults. +Excluding that one module turned out to be super finicky. Like jumping through a set of burning hoops while being blindfolded and having frozen turkey being fired at you from a dozen catapults. The winning strategy in the end turned out to have two different parent POMs, one for the modules that get deployed on Maven central and one for those which don't. To avoid code duplication, the one with the deployment configuration includes the one without as parent module. + +## Pushing Through It took the combined efforts of Christoph and me, and a lot of exploring dead ends until we finally got it right. If you are interested in the solution, check [PR #464](https://github.com/itsallcode/openfasttrace/pull/464/files). -I added a section about the [module structure](https://github.com/itsallcode/openfasttrace/blob/main/doc/developer_guide.md#module-overview) and what that means for the deployment to the developer guide, and Christoph contributed a section about [debugging the new Central deployment](https://github.com/itsallcode/openfasttrace/blob/main/doc/developer_guide.md#debugging-maven-central-deployment. +I added a section about the [module structure](https://github.com/itsallcode/openfasttrace/blob/main/doc/developer_guide.md#module-overview) and what that means for the deployment to the developer guide, and Christoph contributed a section about [debugging the new Central deployment](https://github.com/itsallcode/openfasttrace/blob/main/doc/developer_guide.md#debugging-maven-central-deployment). + +## What's new? In total, that release took us around a month until we had it ready. We improved a lot of documentation, updated dependencies, added support for new JavaScript extensions and added a feature that allows ignoring specification items inside Markdown code blocks. In the course of that last feature, we also added markers `oft:on|off` that allow excluding OFT parsing for selected text passages.