Uploaded image for project: 'Maven PMD Plugin'
  1. Maven PMD Plugin
  2. MPMD-142

PMD Report for maven site fails with ClassCastException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7
    • Fix Version/s: 2.7.1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Maven 2.2.1, Jenkins 1.424.1, Linux RHEL 5

      Description

      Maven 2.2.1 is complaining when mvn site is run.
      It is stopping in PMD report.
      Section from log is below.
      This error appeared freshly this morning. The site goal run successfully before.

      [INFO] Generating "PMD Report" report.
      [WARNING] Deprecated API called - not org.apache.maven.doxia.sink.Sink instance and no SinkFactory available. Please update this plugin.
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] java.lang.String cannot be cast to java.io.File
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      java.lang.ClassCastException: java.lang.String cannot be cast to java.io.File
      	at org.apache.maven.plugin.pmd.AbstractPmdReport.getFilesToProcess(AbstractPmdReport.java:284)
      	at org.apache.maven.plugin.pmd.PmdReport.generateReport(PmdReport.java:249)
      	at org.apache.maven.plugin.pmd.PmdReport.execute(PmdReport.java:175)
      	at org.apache.maven.plugin.pmd.PmdReport.executeReport(PmdReport.java:149)
      	at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:190)
      	at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:144)
      	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:133)
      	at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:100)
      	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
      	at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
      	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)
      

        Attachments

        1. testpom.xml
          0.9 kB
          Jan Ruzicka

          Activity

            People

            • Assignee:
              dennisl@apache.org Dennis Lundberg
              Reporter:
              jan.ruzicka Jan Ruzicka
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: