[ 
http://jira.codehaus.org/browse/MPMD-86?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=210604#action_210604
 ] 

Marc Ende commented on MPMD-86:
-------------------------------

I've got the same issue.

         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-pmd-plugin</artifactId>
            <version>2.4</version>
            <configuration>
               <rulesets>
                  
<ruleset>http://localhost/sonar/rules_configuration/export/java/test/pmd.xml</ruleset>
               </rulesets>
               <configuration>
                  <targetJdk>1.6</targetJdk>
               </configuration>
            </configuration>
         </plugin>

Produces the same errors/warnigns. Even if I have 1.6 in the <source> 
configuration of the compiler plugin. 

The error only disappears when defining a property, like this:
   <properties>
      <targetJdk>1.6</targetJdk>
   </properties>

I think the plugin (or pmd himself) doesn't respect the settings in the 
configuration file and relies on an environment variable. 

> 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

        

Reply via email to