繁体   English   中英

MSBuild.SonarQube.Runner.exe结束,PostProcessing失败退出代码1

[英]MSBuild.SonarQube.Runner.exe end, PostProcessing failed exit code 1

我正在尝试使用MSbuild.SonarQube.Runner为SonarQube使用C#插件

SonarQube服务器 - 4.5.6操作系统 - Windows 32位机器数据库 - MySQL 5.6.17 MSbuild.SonarQube.Runner - 1.0.2

遵循http://docs.sonarqube.org/display/SONAR/Analyzing+with+SonarQube+Scanner+for+MSBuild中提到的步骤

从项目的文件夹中运行所有3个命令。

  1. 第一次尝试

SonarQube.Analysis.xml文件内容

<?xml version="1.0" encoding="utf-8" ?>
<SonarQubeAnalysisProperties  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sonarsource.com/msbuild/integration/2015/1">
   <Property Name="sonar.host.url">http://x.x.x.x:9000</Property>
   <Property Name="sonar.login">userabc</Property>
   <Property Name="sonar.password">1234</Property>
   <!-- Required only for versions of SonarQube prior to 5.2 -->
   <Property Name="sonar.jdbc.url">jdbc:mysql://x.x.x.x:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance</Property>
   <Property Name="sonar.jdbc.username">sonar</Property>
   <Property Name="sonar.jdbc.password">sonar</Property>
</SonarQubeAnalysisProperties>

我尝试运行第一个命令 - MSBuild.SonarQube.Runner.exe begin / k:prj_K / n:prj /v:1.0

但我得到了以下错误

 Unable to read the SonarQube analysis settings file 'C:\Sonar\sonarqube-4.5.6\MSBuild.SonarQube.Runner-1.0.2\SonarQube.Analysis.xml'. Please fix the content of this file. 
  1. 第二次尝试

然后将sonar.jdbc.url的属性值更改为

<Property Name="sonar.jdbc.url">jdbc:mysql://x.x.x.x:3306/sonar?useUnicode=true</Property>   

在第一个命令成功之后。

第二个命令

 msbuild /t:Rebuild

也很成功

第三个命令

 MSBuild.SonarQube.Runner.exe end

我正在低于日志

 INFO: ------------------------------------------------------------------------
 INFO: EXECUTION SUCCESS
 INFO: ------------------------------------------------------------------------
 Total time: 2:02.225s
 Final Memory: 11M/121M
 INFO: ------------------------------------------------------------------------
 Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
 The sonar-runner did not complete successfully
 16:36:59.242  Creating a summary markdown file...
 Post-processing failed. Exit code: 1    

后处理失败。 退出代码:1

我错过了什么?

此外,SonarQube.Analysis.xml中的属性 - sonar.jdbc.username和 - sonar.jdbc.password

他们为什么需要?

提前致谢。

由于写入错误流的MaxPermSize警告, MSBuild.SonarQube.Runner.exe错误地报告处理失败。

这是一个已知问题,由SONARMSBRU-202跟踪。 它应该在SonarQube Scanner for MSBuild的下一个版本中修复

解决方法是通过不设置MaxPermSize来删除警告。

我犯了同样的错误。 当我把它添加到PATH时,我写错了方法。 或者,将MSBUILD添加到PATH ,即使MSBUILD已移动到另一个文件夹,也会收到相同的错误。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM