Adopt tidy-maven-plugin for consistent POM formatting
envgap__javaparser__javaparser-5070
01 / FAILURE SIGNATURE
As reported upstream
No identifying execution failure has been captured.
Not a benchmark task.
- The project already builds and runs before the fix, so there is nothing to repair.
02 / ENVIRONMENT RECIPE
- Base commit
f8cbd5f71f0a31563f9200753ae36eb0de0697a8- Manifest
pom.xml- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
javaparser/javaparser #5070 · read the original issue
## Background Following the successful Spotless adoption for Java source formatting (#4408), the POM files themselves remain inconsistently formatted. Running `tidy:pom` reveals structural inconsistencies across all 9 POM files in the project. ## Current State (tidy:pom analysis) | File | Moved Elements | |------|---------------| | pom.xml (root) | 186 | | javaparser-symbol-solver-testing/pom.xml | 74 | | javaparser-core-testing/pom.xml | 47 | | javaparser-core-testing-bdd/pom.xml | 47 | | javaparser-core-serialization/pom.xml | 39 | | javaparser-symbol-solver-core/pom.xml | 28 | | javaparser-core/pom.xml | 13 | | javaparser-core-generators/pom.xml | 10 | | javaparser-core-metamodel-generator/pom.xml | 10 | **Summary:** 9 files, 245 insertions / 238 deletions, 56 mixed tab/space indentation fixes, 1 schema URL update (http→https). ## Issues Found 1. **Element ordering inconsistency** — `<modules>`, `<properties>`, `<dependencies>` placed in non-canonical order across modules 2. **Mixed indentation** — 56 lines use tabs where spaces are the project standard 3. **Schema URL** — Uses deprecated `http://` instead of `https://` for Maven XSD ## Proposal Follow the same pattern established in #4408 for Spotless adoption: 1. **Add `tidy-maven-plugin` to pluginManagement** (configuration only, no enforcement yet) 2. **Run `tidy:pom` once** to reformat all POMs to canonical Maven ordering 3. **Add the reformat commit to `.git-blame-ignore-revs`** (infrastructure already exists) 4. **Add `tidy:check` to CI** (parallel to Spotless check — ensures POMs stay tidy) ## Benefits - **Consistency** — Developers always know where to find `<properties>`, `<dependencies>`, etc. - **Reduced merge conflicts** — Canonical ordering eliminates "where do I put this?" disagreements - **CI-enforceable** — Same philosophy as Spotless: format once, enforce forever - **Low risk** — Zero functional impact, purely cosmetic ## Considerations - One-time git blame noise (mitigated by `.git-blame-ignore-revs`) - Open PRs touching pom.xml would need rebasing (currently low impact) ## References - [tidy-maven-plugin](https://www.mojohaus.org/tidy-maven-plugin/) - #4408 — Spotless formatting adoption (same approach, successfully implemented) - `.git-blame-ignore-revs` already in place from Spotless reformat Happy to implement this if the approach is acceptable.
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]