Skip to content

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

Open
mnk wants to merge 1 commit intodiffplug:mainfrom
mnk:maven_metadata_fix
Open

Fix publishing of spotless-maven-plugin to include maven-metadata.xml#2905
mnk wants to merge 1 commit intodiffplug:mainfrom
mnk:maven_metadata_fix

Conversation

@mnk
Copy link
Copy Markdown

@mnk mnk commented Apr 25, 2026

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
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'"

1 participant