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

Andreas Dangel commented on MPMD-379:
-------------------------------------

This is currently needed in two cases: When toolchain is used, then PMD is not 
invoked within the current JVM process, but a new one is spawned. This is, what 
Executor#setupLogLevel is responsible for - recreating the environment, that 
maven cli already provided, in the new process.

 

The other case is the parameter {{showPmdLog}} - if this is true, then any 
slf4j log message from within PMD should show up as usual. But if this is set 
to false, then we want to silence out any PMD logging. Since this parameter can 
be true for one module and false for another, the log levels needs to switch at 
runtime if no toolchain is in use. This is what Executor#setupPmdLogging is 
doing.

We could however decide, to remove this parameter and keep the logging enabled 
all the time. That would make it easier. Are there any best practices on how to 
deal with logs from third-party-libs (in that case, PMD is a 3rd-party lib to 
maven)? If one wanted to silence out the logging from PMD, then one could 
change maven's simplelogger.properties (or provide equivalent system properties 
via MAVEN_OPTS).

 

> Support PMD 7.0.0
> -----------------
>
>                 Key: MPMD-379
>                 URL: https://issues.apache.org/jira/browse/MPMD-379
>             Project: Maven PMD Plugin
>          Issue Type: Improvement
>          Components: CPD, PMD
>            Reporter: Andreas Dangel
>            Assignee: Andreas Dangel
>            Priority: Major
>
> Add support for the new major version of PMD.
> This has some non-backward compatible changes. Upgrading m-pmd-p to PMD 7 
> most likely means, that only PMD 7 will be supported onwards (no backwards 
> compatibility supported).
> wip branch: [https://github.com/apache/maven-pmd-plugin/compare/master...pmd7]
>  
> A snapshot version that is compatible with the current 7.0.0 release 
> candidates is available here as version {*}3.21.1-pmd-7-SNAPSHOT{*}:
> {code:java}
>         <pluginRepository>
>             <id>apache.snapshots</id>
>             <name>Apache Snapshot Repository</name>
>             <url>https://repository.apache.org/snapshots</url>
>             <releases>
>                 <enabled>false</enabled>
>             </releases>
>             <snapshots>
>                 <enabled>true</enabled>
>             </snapshots>
>         </pluginRepository> {code}



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

Reply via email to