Skip to content

Commit c8518ec

Browse files
authored
Article about the trouble with the new Central deployment (#18)
* Article about the new Maven Central deployment. * Added `apt-get update` to CI build script.
1 parent d1f7735 commit c8518ec

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

.github/workflows/gh-pages.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ jobs:
2020
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
2121

2222
- name: Setup Hugo
23-
run: sudo apt install hugo
23+
run: |
24+
sudo apt-get update
25+
sudo apt-get install hugo
2426
2527
- name: Build
2628
run: hugo --minify
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: "4.2.0, the release to Maven central that drove us mad"
3+
date: "2025-06-22T14:26:00+01:00"
4+
draft: false
5+
author: Sebastian
6+
---
7+
8+
Although the feature set change for version 4.2.0 is not that big, that was the most painful release we had so far.
9+
10+
## The Challenge of the new Maven Central Deployment
11+
12+
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).
13+
14+
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.
15+
16+
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.
17+
18+
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.
19+
20+
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.
21+
22+
## Multi-module Deployments are Hard
23+
24+
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.
25+
26+
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.
27+
28+
## Pushing Through
29+
30+
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).
31+
32+
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).
33+
34+
## What's new?
35+
36+
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.
37+
38+
For more information, please check the [release letter of 4.2.0](https://github.com/itsallcode/openfasttrace/releases/tag/4.2.0).

0 commit comments

Comments
 (0)