2015-10-05 60 views
0

从MSBuild.SonarQube.Runner.exe命令行分析的前2个阶段(准备,构建)似乎工作正常。MSBuild.SonarQube.Runner.exe尝试连接h2而不是SQL

在SonarQube.Analysis.xml的属性是:

<Property Name="sonar.host.url">http://server-45:9000</Property> 
<Property Name="sonar.login">admin</Property> 
<Property Name="sonar.password">admin</Property> 
<Property Name="sonar.jdbc.url">jdbc:jtds:sqlserver://server-46/SonarQube;instance=INSTANCE01;SelectMethod=Cursor</Property> 
<Property Name="sonar.jdbc.driverClassName">com.microsoft.sqlserver.jdbc.SQLServerDriver</Property> 
<Property Name="sonar.jdbc.username">sonarqube</Property> 
<Property Name="sonar.jdbc.password">stackoverflow</Property> 

最后阶段失败:

17:30:17.358 INFO - Create JDBC datasource for jdbc:h2:tcp://localhost/sonar 

它似乎忽略了本地XML设置完全文件,找到一个默认其中exe是,它与完全相同,但仍尝试创建到数据库的默认h2连接。

完整的日志:

C:\Users\me\Documents\Visual Studio 2013\Projects\ClassLibrary9>MSBuild.SonarQube.Runner end 
Default properties file was found at C:\Apps\MsSonarRunner\SonarQube.Analysis.xml 
Loading analysis properties from C:\Apps\MsSonarRunner\SonarQube.Analysis.xml 
Post-processing started. 
WARNING: File is not under the project directory and cannot currently be analysed by SonarQube. File: C:\Users\me\AppData\Local\Temp\.NETFramework,Version=v4.5.AssemblyAttributes.cs, project: C:\Users\me\Documents\Visual Studio 2013\Projects\ClassLibrary9\ClassLibrary9\ClassLibrary9.csproj 
The SONAR_RUNNER_HOME environment variable is not required and will be ignored. 
SONAR_RUNNER_OPTS is not configured. Setting it to the default value of -Xmx1024m 
Calling the sonar-runner... 
C:\Users\me\Documents\Visual Studio 2013\Projects\ClassLibrary9\.sonarqube\bin\sonar-runner\bin\.. 
SonarQube Runner 2.4 
Java 1.8.0_60 Oracle Corporation (64-bit) 
Windows 8 6.2 amd64 
SONAR_RUNNER_OPTS=-Xmx1024m 
INFO: Error stacktraces are turned on. 
INFO: Runner configuration file: C:\Users\me\Documents\Visual Studio 2013\Projects\ClassLibrary9\.sonarqube\bin\sonar-runner\bin\..\conf\sonar-runner.properties 
INFO: Project configuration file: C:\Users\me\Documents\Visual Studio 2013\Projects\ClassLibrary9\.sonarqube\out\sonar-project.properties 
INFO: Default locale: "en_GB", source code encoding: "UTF-8" 
INFO: Work directory: C:\Users\me\Documents\Visual Studio 2013\Projects\ClassLibrary9\.sonarqube\out\.sonar 
INFO: SonarQube Server 5.1.2 
17:30:17.096 INFO - Load global repositories 
17:30:17.295 INFO - Load global repositories (done) | time=200ms 
17:30:17.296 INFO - Server id: 20151005162012 
17:30:17.298 INFO - User cache: C:\Users\me\.sonar\cache 
17:30:17.304 INFO - Install plugins 
17:30:17.350 INFO - Install JDBC driver 
17:30:17.358 INFO - Create JDBC datasource for jdbc:h2:tcp://localhost/sonar 
INFO: ------------------------------------------------------------------------ 
INFO: EXECUTION FAILURE 
INFO: ------------------------------------------------------------------------ 
Total time: 0.817s 
Final Memory: 8M/245M 
INFO: ------------------------------------------------------------------------ 
17:30:17.415 Creating a summary markdown file... 

这里的任何人任何想法?

在此先感谢。

回答

0

固定。

这是以下的副作用:

我从另一个分析复制批处理文件上和/ s开关指出了一个完全不同的设置xml文件。使用2组不同的设置进行预生成运行和后生成运行会导致混淆。