# Maven checkstyle fails locally

**URL:** <https://talk.openmrs.org/t/maven-checkstyle-fails-locally/49447>\
**Category:** Ask OpenMRS\
**Created:** [May 13, 2026, 10:51am UTC](https://talk.openmrs.org/t/maven-checkstyle-fails-locally/49447 "2026-05-13T10:51:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![flatslug](https://talk.openmrs.org/letter_avatar/flatslug/32/5_5575768a8748004e209b776fc1b2916d.png) [@flatslug](https://talk.openmrs.org/u/flatslug)\
**Post date:** [May 13, 2026, 10:51am UTC](https://talk.openmrs.org/t/maven-checkstyle-fails-locally/49447/1 "2026-05-13T10:51:06Z")

</div>

**Application Name:** openmrs-core

**Version Number:** main branch

**Question:** I am trying to run checkstyle as suggested here ([https://openmrs.atlassian.net/wiki/spaces/docs/pages/25477044/Java+Conventions#Manual-Run](https://openmrs.atlassian.net/wiki/spaces/docs/pages/25477044/Java+Conventions#Manual-Run)), using:

> mvn clean package jxr:aggregate checkstyle:checkstyle-aggregate -DskipTests

I get the following error:

> [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 34.253 s [INFO] Finished at: 2026-05-13T11:36:15+01:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.6.0:checkstyle-aggregate (default-cli) on project openmrs: An error has occurred in Checkstyle report generation.: Failed during checkstyle configuration: cannot initialize module TreeWalker - **TreeWalker is not allowed as a parent of LineLength** Please review ‘Parent Module’ section for this Check in web documentation if Check is standard. → [Help 1]

Looks like someone else had the same problem but no solution ( [make checkstyle work](https://talk.openmrs.org/t/make-checkstyle-work/45468) ).

Is it possible `openmrs-core/checkstyle.xml` doesn’t work with recent versions of checkstyle? Any help appreciated.

---

<div class="post-metadata">

**Author:** ![ibacher](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibacher/32/19751_2.png) [@ibacher](https://talk.openmrs.org/u/ibacher)\
**Post date:** [May 13, 2026, 5:42pm UTC](https://talk.openmrs.org/t/maven-checkstyle-fails-locally/49447/2 "2026-05-13T17:42:52Z")

</div>

Despite what that page says, I don’t think we’ve used Checkstyle in a while. I would probably not try to follow those steps.

---

<div class="post-metadata">

**Author:** ![flatslug](https://talk.openmrs.org/letter_avatar/flatslug/32/5_5575768a8748004e209b776fc1b2916d.png) [@flatslug](https://talk.openmrs.org/u/flatslug)\
**Post date:** [May 13, 2026, 7:10pm UTC](https://talk.openmrs.org/t/maven-checkstyle-fails-locally/49447/3 "2026-05-13T19:10:49Z")

</div>

Ah cool -thanks 🙂
