Question

When I give mvn sonar:sonar for sample java project in sonar I get this error.The sample project is from link

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Simple Java Maven Project 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- sonar-maven-plugin:2.0:sonar (default-cli) @ example-java-maven ---
[INFO] Sonar version: 3.5.1
[INFO] [12:29:59.781] Load batch settings
[INFO] [12:30:00.000] User cache: C:\Documents and Settings\xxx\.sonar\cache

[INFO] [12:30:00.156] Install plugins
INFO] [12:30:03.250] -------------  Executing Project Scan
[INFO] [12:30:04.500] Install JDBC driver
INFO] [12:30:04.515] Apply project exclusions
[WARN] [12:30:04.531] H2 database should be used for evaluation purpose only
[INFO] [12:30:04.531] Create JDBC datasource for jdbc:h2:tcp://localhost/sonar
[INFO] [12:30:04.890] Initializing Hibernate
[INFO] [12:30:09.500] -------------  Inspecting Simple Java Maven Project
[INFO] [12:30:09.515] Load module settings
[INFO] [12:30:09.937] Excluded tests:
[INFO] [12:30:09.937]   **/package-info.java
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.125s
[INFO] Finished at: Thu Jun 13 12:30:11 IST 2013
[INFO] Final Memory: 9M/28M
[INFO] ------------------------------------------------------------------------
ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (d
efault-cli) on project example-java-maven: Can not execute Sonar: You must insta
ll a plugin that supports the language 'java' -> [Help 1]
ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception

Should I manually put any plugin to analyze java project?

Was it helpful?

Solution

It looks like you have removed the Java plugins from your Sonar home directory. You can upload the latest version at http://docs.codehaus.org/display/SONAR/Java+Ecosystem, copy the plugins into SONAR_HOME/extensions/plugins and restart your Sonar server.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top