You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andreas Dangel (Jira)" <ji...@apache.org> on 2021/07/23 13:37:00 UTC

[jira] [Comment Edited] (MPMD-317) NoClassDefFoundError for provided classes

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

Andreas Dangel edited comment on MPMD-317 at 7/23/21, 1:36 PM:
---------------------------------------------------------------

[~hendrik.ebbers] Can you share your complete pmd plugin configuration? Are you using aggregate=true?

If yes, then the bug is simply, that we don't consider dependencies with scope provided yet.

But if not, then this is another bug...

 


was (Author: adangel):
[~hendrik.ebbers] Can you share your complete pmd plugin configuration? Are you using aggregate=true?

If yes, then the bug is simply, that we don't consider dependencies with scope provided yet.

But if not, there this is another bug...

 

> NoClassDefFoundError for provided classes
> -----------------------------------------
>
>                 Key: MPMD-317
>                 URL: https://issues.apache.org/jira/browse/MPMD-317
>             Project: Maven PMD Plugin
>          Issue Type: Bug
>          Components: PMD
>    Affects Versions: 3.13.0
>         Environment: Java 1.8.101
>            Reporter: Hendrik Ebbers
>            Priority: Major
>             Fix For: 3.15.0
>
>
> When executing the pmd:pmd goal on a JakartaEE based project several of the JakartaEE APIs can not be found in the PMD execution:
>  
> {{[INFO] --- maven-pmd-plugin:3.13.0:pmd (default-cli) @ ermittlung ---}}
> {{[WARNING] The project ermittlung-ear does not seem to be compiled. PMD results might be inaccurate.}}
> {{[WARNING] Error during type resolution of field 'Logger' in class de.xx.MyClass due to: java.lang.NoClassDefFoundError: javax/jms/Destination}}
> {{[WARNING] Error during type resolution of field 'xx' in class de.xx.Class2 due to: java.lang.NoClassDefFoundError: javax/persistence/NoResultException}}
> {{[WARNING] Error during type resolution of field 'Logger' in class de.xx.Class2 due to: java.lang.NoClassDefFoundError: javax/jms/Destination}}
> {{[WARNING] Error during type resolution of field 'xx' in class de.xx.Class3 due to: java.lang.NoClassDefFoundError: Ljavax/persistence/LockModeType;}}
>  
> {{I assume that the error is based on the scope of the JakartaEE dependency that is defined as "provided"}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)