[英]Analysis c# Project with Jenkins and Sonarqube - Error calling MSBuild.SonarQube.Runner.exe end
[英]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個命令。
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.
然后將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.