gnodet commented on issue #14165: URL: https://github.com/apache/maven/issues/14165#issuecomment-7242352819
## Root cause After `mvnup` modifies POMs (via domtrip), `au.com.acegi:xml-format-maven-plugin`'s `xml-check` goal detects them as needing re-formatting. The plugin uses DOM4J with `keepBlankLines=false` by default, so the blank lines that domtrip's `PomEditor` adds between new Maven sections (e.g. a newly inserted `<pluginManagement>` block) are stripped on the next format pass — causing `xml-check` to report a diff. ## Fix This was a pure gap in the `maven4-testing` CI framework. The framework already has the right pattern for `spotless` and `sortpom`: 1. **Post-mvnup reformat loop** — runs `spotless:apply`, `sortpom:sort`, `tidy:pom` to reformat POMs before the Maven 4 build, so format-check plugins don't see the mvnup diff. `xml-format:xml-format` was simply missing from this list. 2. **Maven 4 build skip flags** — passes `-Dspotless.check.skip=true -Dsort.skip=true` so format-check goals don't re-fail on anything the reformat loop couldn't fix. `-Dxml-format.skip=true` was missing here too. Fixed in gnodet/maven4-testing@64abded — both gaps filled in one commit. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
