You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2024/05/23 17:38:00 UTC

[jira] [Commented] (MPMD-396) Impractical to fail build on violation

    [ https://issues.apache.org/jira/browse/MPMD-396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17849050#comment-17849050 ] 

Michael Osipov commented on MPMD-396:
-------------------------------------

Regardless of the forking, one needs to check the code for the follwing: checking mojos and report mojos. In your case it should really be a checker mojo.

> Impractical to fail build on violation
> --------------------------------------
>
>                 Key: MPMD-396
>                 URL: https://issues.apache.org/jira/browse/MPMD-396
>             Project: Maven PMD Plugin
>          Issue Type: Bug
>          Components: PMD
>    Affects Versions: 3.22.0
>            Reporter: Delany
>            Priority: Major
>
> Let me start with what I'm trying to achieve. I have a multi-module build and I want it to fail on a violation, quickly.
> I'm not interesting in producing a report.
> The build may include anything from a single module to all modules. In each case, I don't want PMD to try parse the entire code base if I only asked Maven to build a single module.
> I notice that if I use the "aggregate-pmd-check" goal, I get log lines like
> {{[WARNING] org.apache.maven.plugins.pmd.AggregatorPmdReport - Unable to locate Source XRef to link to - DISABLED}}
> Why is AggregatorPmdReport being invoked? Sounds like a legacy issue.
> I also notice that unlike most Maven plugins, the pmd-maven-plugin goal is always forking, indicated by chevrons in the output {{<<< pmd:3.22.0:check}}
> With a single custom XPath rule, the time to complete a build becomes impractical.
> I was hoping to add pmd to my list of static analysis checkers/formatters like checkstyle, impsort, sortpom, errorprone, modernizer etc which are all able to parse source code and do various checks without becoming a burden.
> With the current state of the pmd-maven-plugin (v3.22.0) that does not look likely.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)