Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -51,7 +56,11 @@ 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 \
-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 }}
Expand Down
8 changes: 0 additions & 8 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,4 @@
<properties>
<project.build.outputTimestamp>${reproducible.build.timestamp}</project.build.outputTimestamp>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
8 changes: 0 additions & 8 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,4 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
2 changes: 1 addition & 1 deletion doc/changes/changes_4.2.0.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
41 changes: 40 additions & 1 deletion doc/developer_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

Expand Down Expand Up @@ -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
<settings>
<servers>
<server>
<id>central</id>
<username>user</username>
<password>password</password>
</server>
</servers>
</settings>

```

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.
8 changes: 0 additions & 8 deletions exporter/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,4 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
8 changes: 0 additions & 8 deletions exporter/specobject/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,4 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
8 changes: 0 additions & 8 deletions importer/lightweightmarkup/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,4 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
8 changes: 0 additions & 8 deletions importer/markdown/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,4 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
8 changes: 0 additions & 8 deletions importer/restructuredtext/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,4 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
8 changes: 0 additions & 8 deletions importer/specobject/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,4 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
8 changes: 0 additions & 8 deletions importer/tag/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,4 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
8 changes: 0 additions & 8 deletions importer/xmlparser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,4 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
8 changes: 0 additions & 8 deletions importer/zip/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,4 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
6 changes: 6 additions & 0 deletions openfasttrace-mc-deployable-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ It is maintained separately from the main parent POM for the following reasons:
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<skipPublishing>false</skipPublishing>
<autoPublish>false</autoPublish>
<waitUntil>validated</waitUntil>
<deploymentName>Manual deployment of OpenFastTrace</deploymentName>
Expand All @@ -56,6 +57,11 @@ It is maintained separately from the main parent POM for the following reasons:
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.4</version>
</plugin>
</plugins>
</build>
</profile>
Expand Down
58 changes: 12 additions & 46 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,7 @@
<test.coverage>true</test.coverage>
</systemPropertyVariables>
<useModulePath>true</useModulePath>
<argLine>
<!-- Required for Java >= 18 --> ${test.args} </argLine>
<argLine><!-- Required for Java >= 18 --> ${test.args} </argLine>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -450,7 +449,7 @@
<configuration>
<rules>
<requireMavenVersion>
<version>3.9.9</version>
<version>3.8.7</version>
</requireMavenVersion>
</rules>
</configuration>
Expand Down Expand Up @@ -518,6 +517,15 @@
<artifactId>versions-maven-plugin</artifactId>
<version>2.18.0</version>
</plugin>
<plugin>
<!-- Deployment of this module not required -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.4</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
Expand Down Expand Up @@ -586,18 +594,7 @@
</execution>
</executions>
</plugin>
<!-- The maven-deploy-plugin MUST be disabled when using the central-publishing-maven-plugin!
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<!-- The version does not really matter if all we want is disabling the plugin -->
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<!--This
plugin's configuration is used to store Eclipse
<!-- This plugin's configuration is used to store Eclipse
m2e settings only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
Expand Down Expand Up @@ -645,34 +642,6 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.7.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<centralBaseUrl>https://central.sonatype.com</centralBaseUrl>
<centralSnapshotsUrl>https://central.sonatype.com</centralSnapshotsUrl>
<autoPublish>false</autoPublish>
<waitUntil>validated</waitUntil>
<deploymentName>Manual deployment of OpenFastTrace</deploymentName>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.7</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand All @@ -685,7 +654,4 @@
</plugin>
</plugins>
</reporting>
<!-- With the central-publishing-plugin, the distribution management section
is now obsolete, since the only place this plugin can deploy to is Maven
central anyway. -->
</project>
13 changes: 13 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,17 @@
<module>reporter/aspec</module>
<module>testutil</module>
</modules>
<build>
<plugins>
<plugin>
<!-- Deployment of this module not required -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.4</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
4 changes: 0 additions & 4 deletions product/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,6 @@
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
8 changes: 0 additions & 8 deletions reporter/aspec/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,4 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
8 changes: 0 additions & 8 deletions reporter/html/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,4 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Loading