Skip to content

build: deploy to maven.codelibs.org instead of Maven Central - #185

Merged
marevol merged 1 commit into
masterfrom
build/deploy-to-maven-codelibs
Aug 8, 2026
Merged

build: deploy to maven.codelibs.org instead of Maven Central#185
marevol merged 1 commit into
masterfrom
build/deploy-to-maven-codelibs

Conversation

@marevol

@marevol marevol commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Publish this project to maven.codelibs.org instead of Maven Central, matching the Fess plugins.

Changes

  • Remove the central-publishing-maven-plugin declaration from build/plugins
  • Declare the CodeLibs release and snapshot repositories in distributionManagement
  • README.md: replace the Maven Central badge and show consumers the repository they now have to declare

Why it is done this way

Removing the plugin declaration is the part that actually switches the destination. central-publishing-maven-plugin registers a DeployLifecycleParticipant that clears maven-deploy-plugin's executions whenever the plugin is present in build/plugins, so adding distributionManagement on its own would have had no effect at all.

distributionManagement cannot be inherited from fess-parent: it is inherited unconditionally and a POM cannot exempt itself from what it declares, so declaring it there would also redirect fess-parent's own deployments. fess-parent has to stay on Maven Central, because a parent POM is only resolvable from repositories the consuming project already knows about — see codelibs/fess-parent#66.

The scpexe transport comes from the wagon-ssh-external build extension inherited from fess-parent.

Verification

  • mvn -B validate no longer reports Installing Central Publishing features, so the lifecycle participant is inactive
  • The effective distributionManagement snapshot URL resolves to the CodeLibs snapshot repository
  • mvn deploy to a local file repository writes the POM, jar, sources jar and metadata — the participant would have suppressed this had it still been active

Note

The javadoc.io badge is served from Maven Central, so it will stop tracking new releases after this change. Left as-is for now.

Drop the central-publishing-maven-plugin declaration and declare the CodeLibs
repositories in distributionManagement, matching what the Fess plugins already
do.

Removing the plugin declaration is the part that matters: its
DeployLifecycleParticipant clears maven-deploy-plugin's executions whenever
the plugin is present in build/plugins, so adding distributionManagement alone
would have had no effect. The scpexe transport comes from the
wagon-ssh-external build extension inherited from fess-parent.

distributionManagement cannot be inherited from fess-parent either: it is
inherited unconditionally and a POM cannot exempt itself from what it
declares, so declaring it there would also redirect fess-parent's own
deployments. fess-parent has to stay on Maven Central, because a parent POM is
only resolvable from repositories the consuming project already knows about.

The README is updated to match: the Maven Central badge is replaced and the
installation instructions now show the repository consumers have to declare.

Verified with mvn validate (the participant no longer reports "Installing
Central Publishing features") and with a deploy to a local file repository,
which the participant would have suppressed had it still been active.
@marevol
marevol merged commit 700ec2c into master Aug 8, 2026
1 check passed
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.

1 participant