Skip to content

Declare the spotless version locally - #230

Merged
slachiewicz merged 1 commit into
masterfrom
local-spotless-version
Aug 18, 2026
Merged

Declare the spotless version locally#230
slachiewicz merged 1 commit into
masterfrom
local-spotless-version

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

The spotless plugin version is inherited as ${spotless-maven-plugin.version}. plexus-pom 27 renames every managed version to version.<artifactId>, so that property stops existing and this build fails at POM read:

'build.plugins.plugin.version' for com.diffplug.spotless:spotless-maven-plugin
must be a valid version but is '${spotless-maven-plugin.version}'

Declaring 3.9.0 here — the value the parent supplies today — keeps the build working under both 26 and 27, so the eventual parent bump is a one-line change instead of a two-part one that cannot be merged before the parent is released. The property name follows 27's convention, so it can be deleted and re-inherited afterwards.

Verified: mvn clean verify green on parent 26 with spotless still resolving 3.9.0 and no source reformatted; mvn validate green against a locally installed plexus-pom 27-SNAPSHOT.

This change was created with AI assistance.

The plugin version came from the parent's spotless-maven-plugin.version.
plexus-pom 27 renames every managed version to version.<artifactId>, so
that property disappears and the build fails at POM read with

  'build.plugins.plugin.version' for com.diffplug.spotless:spotless-maven-plugin
  must be a valid version but is '${spotless-maven-plugin.version}'

Declaring 3.9.0 here - the value the parent supplies today - keeps the
build working on both 26 and 27, so the parent bump stays a one-line
change. The name follows the parent's new convention, so once 27 is in
place this property can simply be deleted and inherited again.
@slachiewicz slachiewicz added the build Pull requests that change the build process label Aug 18, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review August 18, 2026 10:27
@slachiewicz
slachiewicz merged commit 980e336 into master Aug 18, 2026
12 checks passed
@slachiewicz
slachiewicz deleted the local-spotless-version branch August 18, 2026 10:27
slachiewicz added a commit that referenced this pull request Aug 19, 2026
The spotless version declared locally in #230 goes with it: 27 supplies
version.spotless-maven-plugin and manages the plugin, so both the
property and the explicit <version> are redundant now. The plugin block
keeps its configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Pull requests that change the build process

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant