[ https://issues.apache.org/jira/browse/MPMD-304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Dangel reassigned MPMD-304: ----------------------------------- Assignee: Andreas Dangel > maven-pmd-plugin should be toolchains-aware > ------------------------------------------- > > Key: MPMD-304 > URL: https://issues.apache.org/jira/browse/MPMD-304 > Project: Maven PMD Plugin > Issue Type: Improvement > Affects Versions: 3.13.0 > Environment: maven 3.6.3 > JDK 1.8 (maven) > JDK 11 (toolchains.xml) > Reporter: Ed Randall > Assignee: Andreas Dangel > Priority: Major > > maven-pmd-plugin should be > [toolchains-aware|https://maven.apache.org/guides/mini/guide-using-toolchains.html] > and pick up the correct JDK used for compilation. If toolchains is in use, > it should select that one, not use the same JDK that maven is running. > > We have an enterprise build system which runs maven under JDK 1.8. Some > projects target 1.8, others target 11. The switch is handled using > toolchains.xml. > PMD seemingly cannot cope with 11 code when maven is running under 1.8. We > are forced to set `pmd.typeResolution=false` to avoid all sorts of strange > errors (eg. 'unused private method' despite it being used 28 times in the > same class). > We do have `targetJdk=11`. > These false errors do not occur when maven itself runs under JDK 11, with > `pmd.typeResolution=true`. -- This message was sent by Atlassian Jira (v8.3.4#803005)