[ http://jira.codehaus.org/browse/MPMD-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163180#action_163180 ]
Paul Sundling commented on MPMD-92: ----------------------------------- You were totally right! MNG-3385 was what was really causing the problem! If I would have known that it would have saved me the time of creating a use case. Guess I'll have to add versions in the reporting section. > Using JDK 1.6 causes "ParseException: Can't use generics unless running in > JDK 1.5 mode! " unless set targetJdk to 1.5, not 1.6 > ------------------------------------------------------------------------------------------------------------------------------- > > Key: MPMD-92 > URL: http://jira.codehaus.org/browse/MPMD-92 > Project: Maven 2.x PMD Plugin > Issue Type: Bug > Components: PMD > Affects Versions: 2.4 > Reporter: Paul Sundling > Assignee: Benjamin Bentmann > Attachments: minimal.zip, MPMD-92.zip > > > Related to http://jira.codehaus.org/browse/MPMD-67 , although they asked me > to open a new issue and since this affects a new version. > This error does not appear when invoking 'mvn pmd:pmd', but only when doing > 'mvn site:site site:deploy'. > It generates at least two types of warnings and related stacktraces: > 1. Caused by: net.sourceforge.pmd.ast.ParseException: ERROR: Can't use enum > as a keyword in pre-JDK 1.5 target > 2. Caused by: net.sourceforge.pmd.ast.ParseException: Can't use generics > unless running in JDK 1.5 mode! > The following zip replicates the problem. > Use JDK 1.6 and use <targetJdk>1.6</targetJdk> and it should fail, even if > you set the compiler to be 1.5. Change to <targetJdk>1.5</targetJdk> and it > should work. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira