maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Lundberg (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MPMD-67) Using JDK 1.6 causes ParseException: Can't use generics unless running in JDK 1.5 mode!
Date Wed, 26 Dec 2007 21:17:58 GMT

    [ http://jira.codehaus.org/browse/MPMD-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_117929
] 

Dennis Lundberg commented on MPMD-67:
-------------------------------------

I have deployed a new 2.3-SNAPSHOT of the plugin. Can please try it out and report here whether
it solves your problem.

> Using JDK 1.6 causes ParseException: Can't use generics unless running in JDK 1.5 mode!
> ---------------------------------------------------------------------------------------
>
>                 Key: MPMD-67
>                 URL: http://jira.codehaus.org/browse/MPMD-67
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Bug
>          Components: PMD
>    Affects Versions: 2.2
>         Environment: Maven 2.0.8
> JDK 1.6
>            Reporter: Will Hoover
>
> While using Maven PMD plugin with:
> 			<plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-pmd-plugin</artifactId>
> 				<version>2.2</version>
> 				<configuration>
> 					<linkXref>true</linkXref>
> 					<sourceEncoding>utf-8</sourceEncoding>
> 					<minimumTokens>100</minimumTokens>
> 					<targetJdk>
> 						1.6
> 					</targetJdk>
> 					<excludes>
> 						<exclude>**/generated/*.java</exclude>
> 					</excludes>
> 				</configuration>
> 			</plugin>
> I get the following error even though JDK is 1.6:
> [WARNING] Failure executing PMD for: SomeGenericJavaClass.java
> net.sourceforge.pmd.PMDException: Error while parsing SomeGenericJavaClass.java
>         at net.sourceforge.pmd.PMD.processFile(PMD.java:104)
>         at net.sourceforge.pmd.PMD.processFile(PMD.java:64)
>         at net.sourceforge.pmd.PMD.processFile(PMD.java:150)
>         at org.apache.maven.plugin.pmd.PmdReport.executeReport(PmdReport.java:228)
>         at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
>         at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:139)
>         at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:269)
>         at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:101)
>         at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:129)
>         at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:96)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: net.sourceforge.pmd.ast.ParseException: Can't use generics unless running
in JDK 1.5 mode!
>         at net.sourceforge.pmd.ast.JavaParser.checkForBadGenericsUsage(JavaParser.java:32)
>         at net.sourceforge.pmd.ast.JavaParser.TypeArguments(JavaParser.java:1962)
>         at net.sourceforge.pmd.ast.JavaParser.ClassOrInterfaceType(JavaParser.java:1911)
>         at net.sourceforge.pmd.ast.JavaParser.ReferenceType(JavaParser.java:1862)
>         at net.sourceforge.pmd.ast.JavaParser.Type(JavaParser.java:1793)
>         at net.sourceforge.pmd.ast.JavaParser.ResultType(JavaParser.java:2182)
>         at net.sourceforge.pmd.ast.JavaParser.MethodDeclaration(JavaParser.java:1382)
>         at net.sourceforge.pmd.ast.JavaParser.ClassOrInterfaceBodyDeclaration(JavaParser.java:1064)
>         at net.sourceforge.pmd.ast.JavaParser.ClassOrInterfaceBody(JavaParser.java:983)
>         at net.sourceforge.pmd.ast.JavaParser.ClassOrInterfaceDeclaration(JavaParser.java:494)
>         at net.sourceforge.pmd.ast.JavaParser.TypeDeclaration(JavaParser.java:386)
>         at net.sourceforge.pmd.ast.JavaParser.CompilationUnit(JavaParser.java:145)
>         at net.sourceforge.pmd.parsers.Java14Parser.parse(Java14Parser.java:23)
>         at net.sourceforge.pmd.PMD.processFile(PMD.java:84)
>         at net.sourceforge.pmd.PMD.processFile(PMD.java:64)
>         at net.sourceforge.pmd.PMD.processFile(PMD.java:150)
>         at org.apache.maven.plugin.pmd.PmdReport.executeReport(PmdReport.java:228)
>         at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
>         at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:139)
>         at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:269)
>         at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:101)
>         at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:129)
>         at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:96)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

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

        

Mime
View raw message