spotless icon indicating copy to clipboard operation
spotless copied to clipboard

[RFE][Docs] Publish g:a:v in maven-plugin-documentation

Open bmarwell opened this issue 2 years ago • 1 comments

This is a recommendation / request for enhancement for https://github.com/diffplug/spotless/blob/main/plugin-maven/README.md.

feature description

Please publish the Maven coordinates for every plugin. E.g. palantir:

<dependency>
    <groupId>com.palantir.javaformat</groupId>
    <artifactId>palantir-java-format</artifactId>
    <version>2.38.0</version>
</dependency>

use case

Users can easily find new versions

Users can use the coordinates and go to https://search.maven.org/ to see whether there are more recent versions, or older versions if needed.

can be picked up by dependency bots

If you put the above into your dependency management, preferably using a property for the version, tools like renovate or dependabot can update the dependency. With the current examples, those versions will never be picked up.

can be scanned by security scanners

If you put the above into your dependency management, security scanners will recognise the artefact, too.

versions without Maven artefacts

For tools like greclipse, publish another URL which can be used. (optional) For greclipse specifically, show the Maven coordinates for the older versions (as mentioned in https://github.com/diffplug/spotless/issues/1922).

bmarwell avatar Dec 04 '23 08:12 bmarwell

PRs welcome. One of the situations Spotless handles is that maven artifacts move around over time. e.g. ktlint I think has lived at three different g:a coordinates while Spotless has supported it, and as an end user you could just set the version and Spotless knew which g:a to fetch it from.

I would focus on a particular formatter that you care about, and then make the docs / etc. how you want for that one formatter.

nedtwigg avatar Dec 04 '23 20:12 nedtwigg