Skip to content

Maven Central pilot: licence, publishing from GitHub Actions, a dependency licence check - #4

Draft
adamjohnwright wants to merge 38 commits into
mainfrom
central/pilot
Draft

adamjohnwright wants to merge 38 commits into
mainfrom
central/pilot

Conversation

@adamjohnwright

@adamjohnwright adamjohnwright commented Nov 23, 2026 •

Copy link
Copy Markdown

A pilot, for review; not to merge yet. Reactome's Java libraries are to move to Maven Central, so builds stop depending on EBI's Nexus (Adam, 17 Nov 2026; EBI's Nexus has been returning 500s and timeouts all day on 23 Nov, failing CI here and in the exporters). This PR and reactome/graph-core#29 show the pattern on the root of the tree and on its most-used library, before it is repeated in other repos.

It builds on Joel's feature/sonatype-updates, which already has most of what Central checks in a POM: licences, developers, SCM, source and javadoc jars, GPG signing, and a Sonatype profile. It adds:

  1. main merged in. The one conflict is resolved to this branch's POMs; see decision A.
  2. LICENSE: Apache-2.0, as the POMs already declare.
  3. Publishing from GitHub Actions (.github/workflows/maven.yml), so the Sonatype token and the signing key aren't on anyone's machine:
    • Every PR and push: the BOMs and reactome-parent are built, unsigned.
    • A v* tag: they're signed and uploaded to the Central Portal. The job runs in a maven-central environment, so GitHub asks a person to approve it, and the secrets live there. The upload then waits in the portal until a person presses Publish, because autoPublish is off.
  4. A licence check of every shipped dependency, set once in reactome-parent's pluginManagement (license-maven-plugin 2.10.0). A child turns it on by naming the plugin, as graph-core's PR does.
    • Allowed: the Apache Software Foundation's categories A and B: Apache-2.0, MIT, BSD-2/3, EPL-1.0/2.0, MPL-1.1/2.0.
    • Several licences: a dependency passes if any one of them is allowed.
    • None allowed, or none declared: the build fails.
  5. Javadoc without doclint, because Central needs a javadoc jar and Java 17's doclint fails the build on old comments. graph-core's first errors are @author Name <email>.
  6. reactome-parent 1.0.7, because 1.0.6 is already in EBI's pst-release and a released version must not be republished with other contents.

What was checked:

  • From an empty Maven repository, with no EBI: the BOMs and reactome-parent install, and graph-core builds its jar, sources and javadoc jars and passes the licence check.
  • The licence check seen failing: with EPL removed from the allowlist, graph-core's build fails on four dependencies (Logback's two jars and AspectJ's two).
  • The workflow passes actionlint.

Decisions for review

  • A. Which versions are real. main's last changes to the POMs (983fa2f, 6dc31e8, 1 Apr 2025) were made by "GoCD User". They're the GoCD pipeline's automatic bumps:

    • graph-core 3.0.0, analysis-core 3.5.0, and so on;
    • neither graph-core 3.0.0 nor this branch's 2.0.10 exists on EBI's Nexus;
    • update_version.sh rewrote each POM whole and dropped its URL, organisation and developers, which Central requires.

    This branch's versions (Nov 2025) are kept. Is that right, and should update_version.sh and release_github.sh (from main, unchanged here) be retired or fixed?

  • B. The EBI repositories in reactome-parent's <repositories>:

    • The cost: every child build asks EBI first for every dependency, third-party ones included. That's slow, and it's why today's outage spreads to everything.
    • Why they stay for now: some artefacts the BOM lists exist only on EBI, such as pathwayExchange and the reactome-base snapshots.
    • The plan: remove them once those are on Central or no longer needed.
  • C. The licence allowlist (above). Should LGPL be allowed for libraries used as plain dependencies? The ASF says no; others say yes.

  • D. doclint off, or fix comments repo by repo?

  • E. tidy: this parent's tidy check fails a child whose POM isn't in its order, so every child needs mvn tidy:pom once when it moves to this parent. That reorders elements and adds blank lines, with no change in meaning; graph-core shows it.

  • F. reactome-pwp-parent (1.0.4) still imports reactome-bom 1.0.5, which exists only on EBI, so it doesn't build without EBI. It's left out of the workflow. Its users, the pwp-* repos, are on the list to archive.

  • G. Credentials:

    • Who holds the org.reactome Central Portal account and the signing key?
    • Who creates the maven-central environment with MAVEN_CENTRAL_USERNAME, MAVEN_CENTRAL_PASSWORD, MAVEN_GPG_PRIVATE_KEY and MAVEN_GPG_PASSPHRASE, in each repo or once for the organisation?
  • H. Tags and versions. One tag publishes every POM here at its own version, which suits a first release. After that, a tag per artefact, or per BOM release, may be clearer.

Added 25 Nov: strict by default, one Java format, dependency updates

Decided with Joel and Adam: publish from main (this PR now targets it), Apache-2.0 for every repository, keep the EBI repositories for now, and Java as strict as the TypeScript side.

  • Compiler: every javac lint but path, and any warning fails the build. It uses release, so java.version must be a release number (11, 17), not 1.8.
  • Javadoc: doclint checks everything a comment says (HTML, references, tags), and a warning fails the build. A member with no comment is allowed (-missing).
  • Format: Spotless with palantir-java-format, checked at verify. mvn spotless:apply formats.
  • Build JDK: 17, enforced.
  • Dependabot: weekly, with minor and patch updates grouped and majors one at a time. It leaves the pinned reflections and logback alone, and the formatter.
  • Compiler plugin: 3.16.0.

What a library needs, to move to this parent:

  1. A warning-free compile.
  2. One formatting-only commit.
  3. If AspectJ compiles its sources, binary weaving instead, as graph-core does (Maven Central pilot: licence, Central's POM metadata, the licence check, publishing graph-core#29). Otherwise javac has nothing to compile, and so nothing to check.

Reviewed adversarially. Its findings are fixed here and in graph-core#29.

Release order: merge this, tag v1.0.7, approve the maven-central job, then press Publish in the portal. The secrets and environment are in place.

🤖 Generated with Claude Code

jweiser added 30 commits July 11, 2025 01:45
jweiser and others added 3 commits November 5, 2025 17:46
…on bumps

main's two POM changes since this branch (983fa2f, 6dc31e8, 1 Apr 2025) are the
GoCD pipeline's automatic version bumps: versions never released (graph-core
3.0.0, 2.0.10 neither on EBI's Nexus), written by update_version.sh, which
rewrote each POM whole and dropped its URL, organisation and developers, which
Maven Central requires. This branch's POMs (Nov 2025) are kept; main's scripts
come in unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dency licence check

- LICENSE: Apache-2.0, as the POMs declare.
- .github/workflows/maven.yml: the BOMs and reactome-parent built on every pull
  request, unsigned; on a v* tag signed and uploaded to the Central Portal, in
  the maven-central environment (a person approves; the token and key are its
  secrets), and published there by a person (autoPublish off).
- reactome-parent 1.0.7 (1.0.6 is already on EBI's pst-release):
  license-maven-plugin in pluginManagement, the allowlist the ASF's categories
  A and B; javadoc made without doclint, which fails on old comments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
adamjohnwright and others added 5 commits November 25, 2026 19:44
The parent's defaults, as strict as the TypeScript side: javac with every lint
(but path) and any warning failing the build; javadoc's doclint with every
check, warnings failing; Spotless with palantir-java-format, checked at verify.
Compiler plugin 3.16.0. Dependabot: weekly, minor and patch grouped, majors
on their own, for Maven and the workflow's actions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The build needs JDK 17 (enforcer): Spotless needs it, and JDK 11's doclint
and 21's serial lint judge the same code differently. java.version is a
release number (release, not source/target, which javac warns about).
Dependabot leaves the pinned reflections and logback, and the formatter,
alone; its comment no longer claims this repository's CI checks an update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A POM on Central stays there, and whoever uses it inherits its repositories. EBI's
Nexus is going away, so the four POMs this publishes (bom-parent, reactome-bom,
reactome-pwp-bom, reactome-parent) no longer declare EBI's repositories or its
distributionManagement. A build check fails if one does again.

The BOMs change, so they get new versions: bom-parent 1.0.1, reactome-bom 1.0.7,
reactome-pwp-bom 1.0.5, and reactome-parent imports those. Their old versions are on
EBI, and one version keeps one content.

The developers are the current maintainers.

Built with an empty local repository: the parent installs from Central alone, and
graph-core (#29) builds against it with its own repositories removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he tag checked

From the adversarial review of this pull request:

- reactome-bom managed popular-pathways and restfulapi with properties nobody defines
  (popular.pathways for popular-pathways, restful.api for restful-api), so a child
  saw the literal ${...}. Fixed; a build step makes a child of reactome-parent and
  fails if any version in its effective POM is unresolved (seen failing with one
  property misspelt again).
- The SCM addresses were not URLs (ssh://github.com:...) or used git://, which GitHub
  no longer serves; one organisation address was http.
- maven.sonatype.central.version was never read (the plugin's version is written in
  place); removed.
- checkout and setup-java pinned to their release commits, since the publish job
  holds the signing key and the Central token.
- The publish job stops unless the tag is on main and is v<reactome-parent's version>.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants