Skip to content

PMD Tool Fails Locally but CI Doesn't Detect It #18479 #18470

@Pankraz76

Description

@Pankraz76

PMD Tool Fails Locally but CI Doesn't Detect It #18479

Summary

Running PMD locally fails, but the CI pipeline doesn't catch this failure. The issue appears after splitting tools in the CI setup.

Details

After splitting the tools in our CI configuration, we've encountered two issues that question the overall CI setup.

Related Links

Expected Behavior

  1. PMD should run successfully both locally and in CI
  2. CI should fail when PMD encounters issues
  3. Local and CI behavior should be consistent

Current Behavior

  1. PMD fails when running locally
  2. CI pipeline continues without detecting the PMD failure
  3. Inconsistent behavior between local and CI environments

Impact

  • Developers may miss critical code quality issues
  • Inconsistent feedback between local development and CI
  • Potential quality issues may reach production

Notes

Need to investigate why CI isn't catching the PMD failures that occur locally. This suggests a configuration discrepancy between local and CI environments.

[INFO] 
[INFO] --- pmd:3.28.0:check (default-cli) @ checkstyle ---
[WARNING] PMD Failure: com.puppycrawl.tools.checkstyle.AbstractAutomaticBean:243 Rule:ExceptionAsFlowControl Priority:3 Exception thrown at line 237 is caught in this block..
[WARNING] PMD Failure: com.puppycrawl.tools.checkstyle.DetailNodeTreeStringPrinter:80 Rule:UnusedPrivateMethod Priority:3 Avoid unused private methods such as 'parseJavadocAsDetailNode(String)'..
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:17 min
[INFO] Finished at: 2025-12-31T11:27:50Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-pmd-plugin:3.28.0:check (default-cli) on project checkstyle: PMD 7.20.0 has found 2 violations. For more details see: /home/circleci/project/target/pmd.xml -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-pmd-plugin:3.28.0:check (default-cli) on project checkstyle: PMD 7.20.0 has found 2 violations. For more details see: /home/circleci/project/target/pmd.xml
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333)
    at org.apache.maven.lifecycle.inte

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions