Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Not A Bug
-
Affects Version/s: 1.1
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:Sonar 2.11 (on Linux)
Client on Windows XP SP3
-
Number of attachments :
Description
As we read that OpenCover is the successor of PartCover, I tried to set OpenCover as Coverage Engine:
sonar.opencover.installDirectory=C:/export/build/dotnet/sawilde-opencover-78d745c
sonar.gallio.coverage.tool=OpenCover
But I ran into the following exception:
[exec] C:\export\build\hudson-slave\workspace\xxx-sonar\characterencoding\xxx>"C:\Programme\Java\jdk1.6.0_20\bin\java.exe" -Dproject.settings=..\xxx-ams-build\config\sonar-project.properties -classpath "c:\export\build\dotnet\sonar-runner-1.1\lib\sonar-runner.jar";"c:\export\build\dotnet\sonar-runner-1.1\lib\sonar-batch-bootstrapper.jar" "-Drunner.home=c:\export\build\dotnet\sonar-runner-1.1" "-Dproject.home=C:\export\build\hudson-slave\workspace\xxx-sonar\characterencoding\xxx" org.sonar.runner.Main
[exec] Runner settings: c:\export\build\dotnet\sonar-runner-1.1\conf\sonar-runner.properties
[exec] Project settings: C:\export\build\hudson-slave\workspace\xxx-sonar\characterencoding\xxx\..\xxx-ams-build\config\sonar-project.properties
[exec] Runner version: 1.1
[exec] Server: http://SERVER:8080/sonar
[exec] Work directory: C:\export\build\hudson-slave\workspace\xxx-sonar\characterencoding\xxx\.sonar
[exec] [INFO] Database dialect class org.sonar.jpa.dialect.MySql
[exec] [INFO] Initializing Hibernate
[exec] [INFO] The following 'sln' file has been found and will be used: C:\export\build\hudson-slave\workspace\xxx-sonar\characterencoding\xxx\Xxx Release 2.10.sln
[exec] [INFO] The project 'Xxx.Core.Tests' has been qualified as a test project.
[exec] [INFO] ------------- Analyzing Xxx
[exec] [INFO] Selected quality profile : [name=ams-dotnet-default,language=cs]
[exec] [INFO] Configure maven plugins...
[exec] [INFO] Compare to previous analysis
[exec] [INFO] Compare over 5 days (2011-11-26)
[exec] [INFO] Compare over 30 days (2011-11-01)
[exec] [INFO] Initializer CSharpProjectInitializer...
[exec] [INFO] Initializer CSharpProjectInitializer done: 0 ms
[exec] [INFO] Sensor org.sonar.plugins.csharp.core.CSharpSourceImporter@1412c18...
[exec] [INFO] Sensor org.sonar.plugins.csharp.core.CSharpSourceImporter@1412c18 done: 18250 ms
[exec] [INFO] Sensor com.sonar.plugins.csharp.squid.C@e79eb3...
[exec] [INFO] Sensor com.sonar.plugins.csharp.squid.C@e79eb3 done: 78310 ms
[exec] [INFO] Sensor org.sonar.plugins.csharp.gallio.GallioSensor@2df...
[exec] [ERROR] Tried to get a CoverageTool with name OpenCover, but such a tool is not supported.
[exec] Exception in thread "main" org.sonar.batch.bootstrapper.BootstrapException: java.lang.IllegalArgumentException: No enum const class org.sonar.dotnet.tools.gallio.CoverageTool.OPENCOVER
[exec] at org.sonar.runner.Runner.delegateExecution(Runner.java:155)
[exec] at org.sonar.runner.Runner.execute(Runner.java:58)
[exec] at org.sonar.runner.Main.main(Main.java:52)
[exec] Caused by: java.lang.IllegalArgumentException: No enum const class org.sonar.dotnet.tools.gallio.CoverageTool.OPENCOVER
[exec] at java.lang.Enum.valueOf(Enum.java:196)
[exec] at org.sonar.dotnet.tools.gallio.CoverageTool.valueOf(CoverageTool.java:32)
[exec] at org.sonar.dotnet.tools.gallio.CoverageTool.findFromName(CoverageTool.java:86)
[exec] at org.sonar.dotnet.tools.gallio.GallioCommandBuilder.setCoverageTool(GallioCommandBuilder.java:153)
[exec] at org.sonar.plugins.csharp.gallio.GallioSensor.analyse(GallioSensor.java:105)
[exec] at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)
[exec] at org.sonar.batch.phases.Phases.execute(Phases.java:93)
[exec] at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)
[exec] at org.sonar.batch.bootstrap.Module.start(Module.java:89)
[exec] at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:110)
[exec] at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:105)
[exec] at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:100)
[exec] at org.sonar.batch.bootstrap.Module.start(Module.java:89)
[exec] at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:96)
[exec] at org.sonar.batch.bootstrap.Module.start(Module.java:89)
[exec] at org.sonar.batch.Batch.execute(Batch.java:74)
[exec] at org.sonar.runner.Launcher.executeBatch(Launcher.java:60)
[exec] at org.sonar.runner.Launcher.execute(Launcher.java:53)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exec] at java.lang.reflect.Method.invoke(Method.java:597)
[exec] at org.sonar.runner.Runner.delegateExecution(Runner.java:152)
[exec] ... 2 more
[exec]
Hi Michael,
please do not create issues on JIRA before asking on the user mailing list, this is not the right way to proceed.
If you had asked the user mailing list, we would have told you that OpenCover is not yet supported in C# Plugins 1.1 but that this feature is planed for C# Plugins 1.2 (see SONARPLUGINS-1324) - which you would have found by yourself if you had searched in JIRA.
Thanks for your understanding.