【发布时间】:2015-11-03 23:43:04
【问题描述】:
我在自己的计算机上运行了 MSBuild.SonarQube.Runner.exe,一切正常。我现在正在尝试自动化这项工作并将其交给 Bamboo。我使用的是相同的 SonarQube 配置(但与 Windows 2008 R2 Server 与 Windows 7 的环境不同)。我正在使用 MSBuild.SonarQube.Runner.exe 和最简单的配置文件(仅 MySQL 服务器)。
我的错误表示 Dinesh 桌面的路径(如果我没记错的话,他是 Sonar Qube 开发人员)
运行 MSBuild.SonarQube.Runner.exe end 后会出现此错误。任何想法 ?
18:00:06 Writing processing summary to E:\bamboo-home\xml-data\build-dir\SON-SVACN0-TEST\.sonarqube\out\ProjectInfo.log
18:00:06 Creating directory: E:\bamboo-home\xml-data\build-dir\SON-SVACN0-TEST\.sonarqube\bin\sonar-runner
18:00:06 The SONAR_RUNNER_HOME environment variable is not required and will be ignored.
18:00:06 Calling the sonar-runner...
18:00:06 SONAR_RUNNER_OPTS is not configured. Setting it to the default value of -Xmx1024m
Unhandled Exception: System.ArgumentException: Item has already been added. Key in dictionary: 'bamboo_capability_system_builder_snr_Sonar_Runner' Key being added: 'bamboo_capability_system_builder_snr_Sonar_runner'
at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at System.Collections.Specialized.StringDictionaryWithComparer.Add(String key, String value)
at System.Diagnostics.ProcessStartInfo.get_EnvironmentVariables()
at SonarQube.Common.ProcessRunner.SetEnvironmentVariables(ProcessStartInfo psi, IDictionary`2 envVariables, ILogger logger) in c:\Users\dinesh\Desktop\sonarsource\sonar-msbuild-runner\SonarQube.Common\ProcessRunner.cs:line 151
at SonarQube.Common.ProcessRunner.Execute(String exeName, String args, String workingDirectory, Int32 timeoutInMilliseconds, IDictionary`2 envVariables, ILogger logger) in c:\Users\dinesh\Desktop\sonarsource\sonar-msbuild-runner\SonarQube.Common\ProcessRunner.cs:line 87
at SonarRunner.Shim.SonarRunnerWrapper.ExecuteJavaRunner(ILogger logger, String exeFileName, String propertiesFileName) in c:\Users\dinesh\Desktop\sonarsource\sonar-msbuild-runner\SonarRunner.Shim\SonarRunner.Wrapper.cs:line 114
at SonarRunner.Shim.SonarRunnerWrapper.Execute(AnalysisConfig config, ILogger logger) in c:\Users\dinesh\Desktop\sonarsource\sonar-msbuild-runner\SonarRunner.Shim\SonarRunner.Wrapper.cs:line 68
at SonarQube.TeamBuild.PostProcessor.Program.Main() in c:\Users\dinesh\Desktop\sonarsource\sonar-msbuild-runner\SonarQube.TeamBuild.PostProcessor\Program.cs:line 51
【问题讨论】:
-
仅供参考,您在我的本地计算机上看到了路径,因为我已经执行了发布,其中包括 *.pdb 文件。这些文件包含机器上用于构建程序集的源文件的绝对路径。有了它们,堆栈跟踪就增加了源信息。您遇到的失败的实际根本原因是无关的。
-
好的,谢谢您的留言。
标签: msbuild sonarqube sonarqube5.1