You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by knorton <ke...@gmail.com> on 2009/07/02 20:25:20 UTC
Re: [jira] Created: (MCHECKSTYLE-112) Error when using custom
Checkstyle configuration
Have you found a solution to this issue, I am getting the same error when
trying to configure a custom config file in a multi-module maven project.
JIRA jira@codehaus.org wrote:
>
> Error when using custom Checkstyle configuration
> -------------------------------------------------
>
> Key: MCHECKSTYLE-112
> URL: http://jira.codehaus.org/browse/MCHECKSTYLE-112
> Project: Maven 2.x Checkstyle Plugin
> Issue Type: Bug
> Affects Versions: 2.2
> Environment: Windows Vista and cygwin
> Reporter: Flavio Pompermaier
> Attachments: checkstyle.xml
>
> If trying to use a custom configuration it seem that Maven cannot
> instantiate properly available checks.
> When I try to run it with a predefined Checkstyle configuration instead,
> everything works well.
> This is how is set up the plugin in the pom.xml:
>
> <reporting>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-checkstyle-plugin</artifactId>
> <configuration>
> <!--
> <configLocation>config/maven_checks.xml</configLocation>
> -->
>
> <configLocation>${basedir}/src/main/config/checkstyle/checkstyle.xml</configLocation>
>
> <suppressionsLocation>${basedir}/src/main/config/checkstyle/suppressions.xml</suppressionsLocation>
> <!--
> <includeTestSourceDirectory>true</includeTestSourceDirectory> -->
> </configuration>
> </plugin>
> ......
>
> And in attachment there's the checkstyle.xml file.
> This is the output of Maven:
>
> Embedded error: Error rendering Maven report: Failed during checkstyle
> configuration
> Unable to instantiate JavadocPackageCheck (OR WHATEVER ELSE CHECK...)
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error during page
> generation
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
> 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: org.apache.maven.plugin.MojoExecutionException: Error during
> page generation
> at
> org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:101)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
> ... 16 more
> Caused by: org.apache.maven.doxia.siterenderer.RendererException: Error
> rendering Maven report: Failed during checkstyle configuration
> at
> org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:149)
> 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)
> ... 18 more
> Caused by: org.apache.maven.reporting.MavenReportException: Failed during
> checkstyle configuration
> at
> org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:648)
> at
> org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
> at
> org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:139)
> ... 22 more
> Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot
> initialize module JavadocPackage - Unable to instantiate JavadocPackage
> at
> com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:165)
> at
> com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:208)
> at
> org.apache.maven.plugin.checkstyle.CheckstyleReport.executeCheckstyle(CheckstyleReport.java:918)
> at
> org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:635)
> ... 24 more
> Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable
> to instantiate JavadocPackage
> at
> com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:152)
> at
> com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:140)
> ... 27 more
> Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable
> to instantiate JavadocPackageCheck
> at
> com.puppycrawl.tools.checkstyle.PackageObjectFactory.doMakeObject(PackageObjectFactory.java:94)
> at
> com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:149)
> ... 28 more
>
> Any Ideas?
>
> --
> 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
>
>
>
>
--
View this message in context: http://www.nabble.com/Created%3A-%28MCHECKSTYLE-112%29-Error-when-using-custom-Checkstyle-configuration-tp24031167p24311764.html
Sent from the Maven - Issues mailing list archive at Nabble.com.