我已经配置了三个项目,其中两个项目每次Jenkins部署到开发环境时都按预期更新 . 但是,当第三个作业填充初始结果时,尽管SonarRunner执行成功,但每次后续运行都不会更新项目 . (我擦过了一些名字和路径) .

这是失败的作业项目文件:#required metaar.projectKey = xxxxxxx sonar.projectName = xxxxxxx sonar.projectVersion = 1.0

# path to source directories (required)
sonar.sources=src

# paths to exclude
#sonar.exclusions=

sonar.scm.disabled=true

sonar.javascript.mode=skip
sonar.css.mode=skip

# Encoding of the source code
sonar.sourceEncoding=UTF-8

这是Jenkins的控制台输出:

SonarQube Runner 2.4
Java 1.7.0_71 Oracle Corporation (64-bit)
Linux 2.6.32-504.3.3.el6.x86_64 amd64
INFO: Error stacktraces are turned on.
INFO: Runner configuration file: xxxxxxxx/sonar-runner.properties
INFO: Project configuration file: NONE
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: xxxxxxx/workspace/.sonar
INFO: SonarQube Server 5.1
12:29:29.558 INFO  - Load global repositories
12:29:29.784 INFO  - Load global repositories (done) | time=228ms
12:29:29.786 INFO  - Server id: 20150522113240
12:29:29.788 INFO  - User cache: /var/lib/jenkins/.sonar/cache
12:29:29.797 INFO  - Install plugins
12:29:30.091 INFO  - Install JDBC driver
12:29:30.112 INFO  - Create JDBC datasource for jdbc:mysql://xxxxxxx/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
12:29:31.619 INFO  - Initializing Hibernate
12:29:33.037 INFO  - Load project repositories
12:29:34.129 INFO  - Load project repositories (done) | time=1092ms
12:29:34.130 INFO  - Load project settings
12:29:34.834 INFO  - Load technical debt model
12:29:34.863 INFO  - Apply project exclusions
12:29:36.001 INFO  - -------------  Scan www.XXXXXXXXX.com-XXXXXXXX
12:29:36.005 INFO  - Load module settings
12:29:36.214 INFO  - Load rules
12:29:37.422 INFO  - Base dir: xxxxx/workspace
12:29:37.422 INFO  - Working dir: xxxxx.sonar
12:29:37.422 INFO  - Source paths: src
12:29:37.423 INFO  - Source encoding: UTF-8, default locale: en_US
12:29:37.423 INFO  - Index files
12:29:38.342 INFO  - 254 files indexed
12:29:43.048 INFO  - Quality profile for java: Sonar way
12:29:43.048 INFO  - Quality profile for xml: Sonar way
12:29:43.524 WARN  - ----------------------------------------------------------------
12:29:43.524 WARN  - Sonargraph: Skipping project xxxxx, since no Sonargraph rules are activated in current SonarQube quality profile.
12:29:43.524 WARN  - ----------------------------------------------------------------
12:29:43.526 INFO  - JIRA issues sensor will not run as some parameters are missing.
12:29:43.541 INFO  - Sensor JavaSquidSensor
12:29:44.015 INFO  - Java Main Files AST scan...
12:29:44.017 INFO  - 238 source files to be analyzed
12:29:55.279 INFO  - 238/238 source files analyzed
12:29:55.278 INFO  - Java Main Files AST scan done: 11263 ms
12:29:55.279 WARN  - Java bytecode has not been made available to the analyzer. The org.sonar.java.bytecode.visitor.DependenciesVisitor@7cd07967, org.sonar.java.checks.UnusedPrivateMethodCheck@43b7ee4b, org.sonar.java.checks.RedundantThrowsDeclarationCheck@607da0a8 are disabled.
12:29:55.280 INFO  - Java Test Files AST scan...
12:29:55.280 INFO  - 0 source files to be analyzed
12:29:55.280 INFO  - Java Test Files AST scan done: 0 ms
12:29:55.280 INFO  - 0/0 source files analyzed
12:29:55.466 INFO  - Sensor JavaSquidSensor (done) | time=11925ms
12:29:55.467 INFO  - Sensor Lines Sensor
12:29:55.501 INFO  - Sensor Lines Sensor (done) | time=34ms
12:29:55.501 INFO  - Sensor QProfileSensor
12:29:55.505 INFO  - Sensor QProfileSensor (done) | time=4ms
12:29:55.506 INFO  - Sensor InitialOpenIssuesSensor
12:30:29.395 INFO  - Sensor InitialOpenIssuesSensor (done) | time=33889ms
12:30:29.395 INFO  - Sensor ProjectLinksSensor
12:30:29.404 INFO  - Sensor ProjectLinksSensor (done) | time=9ms
12:30:29.404 INFO  - Sensor VersionEventsSensor
12:30:29.427 INFO  - Sensor VersionEventsSensor (done) | time=23ms
12:30:29.427 INFO  - Sensor XmlSensor
12:31:14.500 INFO  - Sensor XmlSensor (done) | time=45073ms
12:31:14.500 INFO  - Sensor LineCountSensor
12:31:15.041 INFO  - Sensor LineCountSensor (done) | time=541ms
12:31:15.041 INFO  - Sensor SurefireSensor
12:31:15.728 INFO  - Sensor SurefireSensor (done) | time=687ms
12:31:15.729 INFO  - Sensor SCM Sensor
12:31:15.729 INFO  - SCM Sensor is disabled
12:31:15.729 INFO  - Sensor SCM Sensor (done) | time=0ms
12:31:15.729 INFO  - Sensor CPD Sensor
12:31:15.729 INFO  - JavaCpdEngine is used for java
12:31:15.731 INFO  - Cross-project analysis disabled
12:31:16.474 INFO  - DefaultCpdEngine is used for xml
12:31:16.476 INFO  - Sensor CPD Sensor (done) | time=747ms
12:31:16.477 INFO  - No quality gate is configured.
12:31:16.520 INFO  - Compare to previous analysis (2015-05-22)
12:31:16.524 INFO  - Compare over 30 days (2015-04-26, analysis of Fri May 22 11:08:22 CDT 2015)
12:31:17.192 INFO  - Execute decorators...
12:32:58.147 INFO  - Store results in database
12:33:12.805 INFO  - Analysis reports generated in 4585ms, dir size=64 MB
12:33:14.429 INFO  - Analysis reports compressed in 1624ms, zip size=9 MB
12:33:16.335 INFO  - Analysis reports sent to server in 1905ms
12:33:16.336 INFO  - ANALYSIS SUCCESSFUL, you can browse xxxxxx
12:33:16.336 INFO  - Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report.
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
Total time: 3:47.493s
Final Memory: 37M/2167M