Skip to content

Fix publishing of spotless-maven-plugin to include maven-metadata.xml#2905

Closed
mnk wants to merge 2 commits into
diffplug:mainfrom
mnk:maven_metadata_fix
Closed

Fix publishing of spotless-maven-plugin to include maven-metadata.xml#2905
mnk wants to merge 2 commits into
diffplug:mainfrom
mnk:maven_metadata_fix

Conversation

@mnk

@mnk mnk commented Apr 25, 2026

Copy link
Copy Markdown

The maven-metadata.xml file was not being published to Maven Central for the Spotless Maven Plugin. This updates the publishing configuration in gradle/java-publish.gradle to use the mavenPlugin software component (provided by the maven-plugin-development Gradle plugin) instead of the plain java component. This ensures the necessary plugin descriptor and maven-metadata.xml are generated and included during publication.

I am not able to test this, so not sure if it actually works.

Fixes #520

The maven-metadata.xml file was not being published to Maven Central for the Spotless Maven Plugin. This updates the publishing configuration in `gradle/java-publish.gradle` to use the `mavenPlugin` software component (provided by the `maven-plugin-development` Gradle plugin) instead of the plain `java` component. This ensures the necessary plugin descriptor and maven-metadata.xml are generated and included during publication.

Fixes diffplug#520
@nedtwigg

nedtwigg commented Jun 8, 2026

Copy link
Copy Markdown
Member

Here's Claude's take on this fwiw:

The blocker — the PR's core change is fundamentally unworkable, not just
merge-broken:

@nedtwigg nedtwigg closed this Jun 8, 2026
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.

Maven can't locate this plugin due to "org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'spotless'"

2 participants