You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Bram (JIRA)" <ji...@codehaus.org> on 2010/06/04 10:19:13 UTC
[jira] Commented: (MPMD-86) Using JDK 1.5 causes ParseException:
Can't use generics unless running in JDK 1.5 mode!
[ http://jira.codehaus.org/browse/MPMD-86?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=224054#action_224054 ]
Bram commented on MPMD-86:
--------------------------
Same here, I've configured the PMD plugin with:
<reporting>
<plugins>
....
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<configuration>
<targetjdk>1.6</targetjdk>
<rulesets>
<ruleset>/rulesets/basic.xml</ruleset>
<ruleset>/rulesets/controversial.xml</ruleset>
</rulesets>
<format>xml</format>
<linkXref>true</linkXref>
<sourceEncoding>utf-8</sourceEncoding>
<minimumTokens>100</minimumTokens>
</configuration>
</plugin>
And my source builds towards JDK 1.6:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
With that, I get a lot of warnings on non-1.4 issues like annotations and generics.
After configuring the following project property, these warnings disappeared:
<project>
...
<properties>
<targetJdk>1.6</targetJdk>
</properties>
> Using JDK 1.5 causes ParseException: Can't use generics unless running in JDK 1.5 mode!
> ---------------------------------------------------------------------------------------
>
> Key: MPMD-86
> URL: http://jira.codehaus.org/browse/MPMD-86
> Project: Maven 2.x PMD Plugin
> Issue Type: Bug
> Components: PMD
> Affects Versions: 2.4
> Environment: JAVA 1.5, Maven 2.0.9
> Reporter: Debabrat Panda
> Assignee: Benjamin Bentmann
>
> While running PMD with Maven i am getting parsing error "Error while parsing ../../../java file"
> The errors are
> 1. Can't use generics unless running in JDK 1.5 mode!
> 2. Can't use static imports when running in JDK 1.4 mode!
> Can't use annotations when running in JDK 1.4 mode!
> Any help will be appreciated.
> Thanks in advance.
--
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