Uploaded image for project: 'SwitchYard'
  1. SwitchYard
  2. SWITCHYARD-2843

Changes in maven checkstyle plugin causing build errors


    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.1.0
    • Component/s: build, tooling
    • Labels:
    • Steps to Reproduce:

      with your local tools (or switchyard) git repo, do this at the command line:

      mvn -U clean install checkstyle:check

      with your local tools (or switchyard) git repo, do this at the command line: mvn -U clean install checkstyle:check


      An issue has arisen with the Mars-based build of SwitchYard Tools for version 2.1.0 (master). Apparently the maven checkstyle plug-in has updated what version of checkstyle they are using and it's causing the build to fail.

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.8:check (default-cli) on project switchyard-parent: Failed during checkstyle configuration: cannot initialize module TreeWalker - Unable to instantiate DoubleCheckedLocking: Unable to instantiate DoubleCheckedLockingCheck -> [Help 1]

      This seems to be due to this issue - https://issues.apache.org/jira/browse/MCHECKSTYLE-189

      We are currently referencing the 2.8 version of the maven checkstyle plugin in the switchyard pom - https://github.com/jboss-switchyard/switchyard/blob/master/pom.xml#L412

      We have the DoubleCheckedLocking module referenced here - https://github.com/jboss-switchyard/switchyard/blob/master/core/build/src/main/resources/checkstyle/checkstyle.xml#L190

      Which is referenced downstream by the SwitchYard tools pom - https://github.com/jboss-switchyard/tools/blob/master/pom.xml#L46

      Removing the DoubleCheckedLocking module line enables us to get working again (in both the SwitchYard and Tools github repos), but raises a few checkstyle issues. So I'm concerned that simply removing it is really the way to go. It's minor, but I think the checkstyle errors (2 in switchyard, 1 in tools) are bogus.

      The luna (2.0.x) branch of the tools project builds just fine, so something has to have changed upstream from the switchyard project. I have tried updating the version of the maven checkstyle plugin to various values (2.12.1, 2.15, etc.) but had no luck in getting this unstuck. And we are definitely stuck here. We cannot build the master branch of tools at present.

      Thomas Cunningham Paul Leacu Nick Boldt Keith Babo Any ideas?

      Andrej Podhradsky This all stemmed from your request for a regular nightly build site for the switchyard tooling, so thank you for kicking off this entertaining discussion!

        Gliffy Diagrams


            Issue Links



                • Assignee:
                  bfitzpat Brian Fitzpatrick
                  bfitzpat Brian Fitzpatrick
                  Andrej Podhradsky
                • Votes:
                  0 Vote for this issue
                  1 Start watching this issue


                  • Created: