简体   繁体   中英

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

I am trying to use C# Plugin for SonarQube using MSbuild.SonarQube.Runner

SonarQube Server - 4.5.6 Operating system - Windows 32-bit machine Database - MySQL 5.6.17 MSbuild.SonarQube.Runner - 1.0.2

Following steps mentioned in http://docs.sonarqube.org/display/SONAR/Analyzing+with+SonarQube+Scanner+for+MSBuild

Running all the 3 commands from the folder of the project.

  1. First Try

SonarQube.Analysis.xml file contents

<?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>

I tried running first command - MSBuild.SonarQube.Runner.exe begin /k:prj_K /n:prj /v:1.0

but I got below error

 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. Second Try

Then the change the property value of sonar.jdbc.url to

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

After this first command is successful.

Second command

 msbuild /t:Rebuild

is also successful

Third command

 MSBuild.SonarQube.Runner.exe end

I am getting below logs

 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    

Post-processing failed. Exit code: 1

What I am missing?

Also, Properties in SonarQube.Analysis.xml - sonar.jdbc.username and - sonar.jdbc.password

Why they are required?

Thanks in Advance.

MSBuild.SonarQube.Runner.exe is incorrectly reporting that processing failed because of the warning about MaxPermSize that was written to the error stream.

This is a known issue, tracked by SONARMSBRU-202 . It should be fixed in the next release of the SonarQube Scanner for MSBuild .

The workaround is to remove the warning by not setting MaxPermSize .

I took the same mistake. I wrote the wrong way when I added it to PATH . Or, after you add the MSBUILD to PATH , the same error is received even if the MSBUILD was moved to another folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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