I am using sonar-runner
and try to parse my C# solution. The coverage tool that I use for Gallio is
OpenCover (Although I am getting the same exception with dotCover). I have
the following two problems:
1- This problem: http://stackoverflow.com/questions/10519558/createprocess-error-206-the-filename-or-extension-is-too-long-when-running-main">http://stackoverflow.com/questions/10519558/createprocess-error-206-the-filename-or-extension-is-too-long-when-running-main
The parameters that are passed to OpenCover are too long. I tried to
decrease the path length by creating a junction from C:\s to source folder
but it didn't help.
Exception in thread "main"
org.sonar.runner.RunnerException:
org.sonar.api.utils.command.CommandException: java.io.IOException: Cannot
run program "C:\Program Files\OpenCover\OpenCover.Console.exe" (in
directory
"F:\VP\playpens\development\subversion\MyLovelyProjectFolder\.sonar"):
CreateProcess error=206, The filename or extension is too long
at org.sonar.runner.Runner.delegateExecution(Runner.java:288)
at org.sonar.runner.Runner.execute(Runner.java:151)
at org.sonar.runner.Main.execute(Main.java:84)
at org.sonar.runner.Main.main(Main.java:56)
Caused by: org.sonar.api.utils.command.CommandException:
java.io.IOException: Cannot run program "C:\Program
Files\OpenCover\OpenCover.Console.exe" (in directory
"F:\VP\playpens\development\subversion\MyLovelyProjectFolder\.sonar"):
CreateProcess error=206, The filename or extension is too long
The command that is tried to be
executed is the following:
16:17:47.593 INFO
.u.c.CommandExecutor - Executing command: C:\Program
Files\OpenCover\OpenCover.Console.exe -register:user -target:C:\Program
Files\Gallio\bin\Gallio.Echo.exe
-targetdir:F:\VP\playpens\development\subversion\MyLovelyProjectFolder\.sonar
"-targetargs:\"/r:IsolatedAppDomain\"
\"/report-directory:F:\VP\playpens\development\subversion\MyLovelyProjectFolder\.sonar\"
\"/report-name-format:gallio-report\" \"/report-type:Xml\"
\"assembly1.dll"
\"assembly2.dll"
....
\"assemblyN.dll"
-output:F:\VP\playpens\development\subversion\MyLovelyProjectFolder\.sonar\coverage-report.xml
What do you advise me to
do?
2- When I enable the StyleCop
plugin, it is throwing the following exception:
Exception in thread "main"
org.sonar.runner.RunnerException: org.sonar.api.utils.SonarException:
StyleCop execution failed.
at org.sonar.runner.Runner.delegateExecution(Runner.java:288)
at org.sonar.runner.Runner.execute(Runner.java:151)
at org.sonar.runner.Main.execute(Main.java:84)
at org.sonar.runner.Main.main(Main.java:56)
Caused by: org.sonar.api.utils.SonarException: StyleCop execution
failed.
at
org.sonar.plugins.csharp.stylecop.StyleCopSensor.analyse(StyleCopSensor.java:139)
at
org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)
at org.sonar.batch.phases.Phases.execute(Phases.java:97)
at
org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:128)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at
org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:114)
at
org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:109)
at
org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:104)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at
org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:121)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at org.sonar.batch.Batch.execute(Batch.java:104)
at
org.sonar.runner.internal.batch.Launcher.executeBatch(Launcher.java:69)
at
org.sonar.runner.internal.batch.Launcher.execute(Launcher.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.sonar.runner.Runner.delegateExecution(Runner.java:285)
... 3 more
Caused by: org.sonar.dotnet.tools.stylecop.StyleCopException: StyleCop
execution failed with return code '1'. Check StyleCop documentation for
more information.
at
org.sonar.dotnet.tools.stylecop.StyleCopRunner.execute(StyleCopRunner.java:145)
at
org.sonar.plugins.csharp.stylecop.StyleCopSensor.launchStyleCop(StyleCopSensor.java:155)
at
org.sonar.plugins.csharp.stylecop.StyleCopSensor.analyse(StyleCopSensor.java:137)
I see similar errors related to
path length:
16:35:05.942 INFO .u.c.CommandExecutor -
F:\VP\playpens\development\subversion\MyLovelyProjectFolder\.sonar
16:35:05.942 INFO .u.c.CommandExecutor - \stylecop-msbuild.xml(12,9):
error MSB4018: The "CreateItem" task failed unexpectedly.
16:35:05.942 INFO .u.c.CommandExecutor -
F:\VP\playpens\development\subversion\MyLovelyProjectFolder\.sonar
16:35:05.942 INFO .u.c.CommandExecutor - \stylecop-msbuild.xml(12,9):
error MSB4018: System.IO.PathTooLongException: The specified path, file
name, or both
16:35:05.942 INFO .u.c.CommandExecutor - are too long. The fully
qualified file name must be less than 260 characters, and the directory
name must be less
16:35:05.942 INFO .u.c.CommandExecutor - than 248 characters.
16:35:05.942 INFO .u.c.CommandExecutor -
F:\VP\playpens\development\subversion\MyLovelyProjectFolder\.sonar
16:35:05.942 INFO .u.c.CommandExecutor - \stylecop-msbuild.xml(12,9):
error MSB4018: at System.IO.Path.NormalizePath(String path, Boolean
fullCheck, Int32
16:35:05.942 INFO .u.c.CommandExecutor - maxPathLength)
Note: I tried to access the
user email list to describe this problem first but was unable to send an
email although I have subscribed to the list.
|