spotless icon indicating copy to clipboard operation
spotless copied to clipboard

G level meta-data is not published for spotless-maven-plugin

Open slawekjaranowski opened this issue 2 months ago • 4 comments

Each Maven plugin should publish G-Level meta-data.

https://maven.apache.org/repositories/metadata.html

It is missing: https://repo.maven.apache.org/maven2/com/diffplug/spotless/maven-metadata.xml

reference:

  • https://github.com/apache/maven/issues/11252

slawekjaranowski avatar Oct 11 '25 11:10 slawekjaranowski

happy to merge a PR for this. Here is an example of adding special stuff to the maven pom just for the maven plugin:

https://github.com/diffplug/spotless/blob/9ed5d6b53e6ffa584b1b3dbe9fff1149628a4474/gradle/java-publish.gradle#L156-L162

nedtwigg avatar Oct 11 '25 19:10 nedtwigg

I'm afraid that it is not missing stuff in pom.xml ... It is missing meta-data, which should be generated during deployments.

slawekjaranowski avatar Oct 12 '25 10:10 slawekjaranowski

  • With https://github.com/apache/maven/issues/11252#issuecomment-3394235336 - maybe it's the missing packaging (perhaps implicit to jar instead of explicit maven-plugin) in spotless-maven-plugin-2.46.1.pom that did not trigger Central to generate metadata for plugin?

pzygielo avatar Oct 12 '25 11:10 pzygielo

Uploaded spotless-m-p locally - with original pom - no MD was created, and with altered pom (added packaging) - and MD was created.

I might be wrong, but based on quick nexus code check, I guess that the current manager (not sure which version in used on Central) - DOES check jar contents (i.e. inspects plugin.xml) - but only on MD rebuild. Maybe Central could be asked to regenerate MD for c.d.spotless and the file would be created. (Perhaps such task is used only on request or very rarely (once per century or so) due to volume there.)

pzygielo avatar Oct 12 '25 15:10 pzygielo