Skip to content

Spotless spaceless self-closing rule conflicts with maven-release-plugin's POM output, breaking release deploys #566

@khatchad

Description

@khatchad

Cutting 0.47.0 surfaced a release-breaking conflict between the Spotless self-closing-tag rule (#535, ponder-lab#351) and the maven-release-plugin.

Problem

ponder-lab#351 pins the spaceless self-closing form (<tag/>) via a Spotless replaceRegex, and its commit message states this "matches the maven-release-plugin's native output." That premise is incorrect. maven-release-plugin 3.3.1 re-serializes the root pom.xml during the version bump and emits the spaced form (<tag />):

  • base master: <argLine/>
  • [maven-release-plugin] prepare release 0.47.0 commit: <argLine />

So every release commit is Spotless-dirty on the root POM, in direct conflict with the enforced style.

Why it now breaks deploys

Previously this was only a master-hygiene nuisance, patched after the fact (e.g. c3d3d51e, "Apply spotless to pom.xml after release-plugin rewrite"), because the old ml-X.Y.Z tags failed the semver deploy gate and skipped deploy anyway. After ponder-lab#349 pinned tagNameFormat to plain X.Y.Z, the tag-push deploy actually runs — and its build job fails at "Check formatting with Spotless" on the dirty POM, so release-upload is skipped and the version never publishes via CI. 0.47.0 had to be deployed manually.

Suggested fix

Reconcile the two so releases produce Spotless-clean POMs with no manual step. Since maven-release-plugin owns POM serialization and emits the spaced form, the simplest fix is to exclude pom.xml from the spaceless self-closing enforcement (keep enforcing it on the summary XMLs like tensorflow.xml, where #351's normalization is valuable and nothing else rewrites them). Alternatively, automate spotless:apply into the release flow so both the release commit and the tag are clean.

Surfaced while releasing ponder-lab/ML 0.47.0 (the #539 fix).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions