This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven-checkstyle-plugin error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven-checkstyle-plugin error" Watch "Maven-checkstyle-plugin error" New topic
Author

Maven-checkstyle-plugin error

Abhijith Prabhakar
Ranch Hand

Joined: Dec 29, 2006
Posts: 56
I am setting up hudson for checkstyle. I have installed checkstyle 3.9 and Static code analysis plug-in 1.9 version. I am using maven-checkstyle-plugin version 2.6 locally and this is working fine.

But in Hudson I am gettting below error. Any leads on how to solve this?at java.lang.Thread.run(Thread.java:662)

Caused by: java.lang.NoSuchMethodError: hudson.plugins.checkstyle.CheckStyleReporter.getModuleName(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String;
at hudson.plugins.checkstyle.CheckStyleReporter.perform(CheckStyleReporter.java:81)
at hudson.plugins.analysis.core.HealthAwareMavenReporter.postExecute(HealthAwareMavenReporter.java:197)
at hudson.maven.Maven3Builder$MavenExecutionListener.reccordMojoSucceeded(Maven3Builder.java:568)
at hudson.maven.Maven3Builder$MavenExecutionListener.mojoSucceeded(Maven3Builder.java:531)
at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:87)
at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:228)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5835
    
    7

My guess is that there is a version mismatch between the checkstyle plugin and Hudson. The solution would be to install the proper version of the checkstyle plugin.

Another possibility is that the plugin got corrupted during the download. (I'm sort of leaning towards this because how else could the perform() method in the CheckStyleReporter be calling a non-existent method in that same class?)


JBoss In Action
Abhijith Prabhakar
Ranch Hand

Joined: Dec 29, 2006
Posts: 56
Thanks peter,

There was a mismatch between checkstyle and analysis core plugin. Got fixed once I put correct analysis core plugin to hudson.

Thanks for your help.

 
GeeCON Prague 2014
 
subject: Maven-checkstyle-plugin error