[ 
http://jira.codehaus.org/browse/MPMD-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Bentmann updated MPMD-92:
----------------------------------

    Attachment: MPMD-92.zip

Attached is a minimal test project that
a) produces the described warnings upon invocation of "mvn site"
b) succeeds upon invocation of "mvn pmd:pmd"

Please note that the test project is deliberately broken for the sake of 
demonstration: The version of the PMD Plugin under {{<reporting>}} is locked 
down to 2.2 while {{<pluginManagement>}} specifies version 2.4. That 
illustrates the different plugin behavior originates from the use of different 
plugin versions.

The test project provided by Paul does not specify a version for the plugin 
under {{<reporting>}}, hence defaults to LATEST because {{<pluginManagement>}} 
does *not* apply to reporting plugins (cf. MNG-3385).. LATEST in turn resolves 
to whatever the {{maven-metadata.xml}} in Paul's local repo has. Paul, if you 
run "mvn site -U", i.e. force a plugin update, you should see a message like
{noformat}
[INFO] artifact org.apache.maven.plugins:maven-pmd-plugin: checking for updates 
from central
{noformat}
indicating that the plugin version has not been locked down by the POM. If my 
diagnosis is wrong, please also attach a debug log of the build so that we can 
see what plugin version the build actually employs.

> 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
>         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

        

Reply via email to