我是詹金斯的新手。我有一个Maven项目,我有2个模块。我使用自定义工作空间在Jenkins中配置它。我已经给了maven目标,例如" clean"," install"。构建工作正常。我已经下载了声纳插件,当我添加"声纳分析与maven"在构建部分中的选项,构建是成功的。但是分析仅针对父模块而不针对子模块进行。 请参阅以下控制台输出:
[INFO] SonarQube version: 5.1.2
[INFO] Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
[INFO] [09:24:30.282] Load global repositories
[INFO] [09:24:30.397] Load global repositories (done) | time=115ms
[INFO] [09:24:30.397] Server id: 20160523075201
[INFO] [09:24:30.397] User cache: C:\Users\shruthi.sathyanaraya\.sonar\cache
[INFO] [09:24:30.407] Install plugins
[INFO] [09:24:30.565] Install JDBC driver
[INFO] [09:24:30.575] Create JDBC datasource for jdbc:h2:tcp://localhost/sonar
[INFO] [09:24:31.475] Initializing Hibernate
[INFO] [09:24:33.010] Load project repositories
[INFO] [09:24:33.175] Load project repositories (done) | time=165ms
[INFO] [09:24:33.175] Load project settings
[INFO] [09:24:33.880] Load technical debt model
[INFO] [09:24:33.947] Apply project exclusions
[INFO] [09:24:34.270] ------------- Scan personaltitania_releases sonar.branch
[INFO] [09:24:34.270] Load module settings
[INFO] [09:24:34.387] Load rules
[INFO] [09:24:34.892] Base dir: C:\SVN\Maven_Git\titaniadev\personaltitania_releases
[INFO] [09:24:34.892] Working dir: C:\SVN\Maven_Git\titaniadev\personaltitania_releases\target\sonar
[INFO] [09:24:34.892] Source paths: pom.xml
[INFO] [09:24:34.892] Source encoding: windows-1252, default locale: en_US
[INFO] [09:24:34.892] Index files
[INFO] [09:24:34.892] 0 files indexed
[INFO] [09:24:34.950] Sensor Lines Sensor
[INFO] [09:24:34.950] Sensor Lines Sensor (done) | time=0ms
[INFO] [09:24:34.950] Sensor QProfileSensor
[INFO] [09:24:34.970] Sensor QProfileSensor (done) | time=20ms
[INFO] [09:24:34.970] Sensor InitialOpenIssuesSensor
[INFO] [09:24:35.060] Sensor InitialOpenIssuesSensor (done) | time=90ms
[INFO] [09:24:35.060] Sensor ProjectLinksSensor
[INFO] [09:24:35.080] Sensor ProjectLinksSensor (done) | time=20ms
[INFO] [09:24:35.080] Sensor VersionEventsSensor
[INFO] [09:24:35.080] Sensor VersionEventsSensor (done) | time=0ms
[INFO] [09:24:35.080] Sensor Maven dependencies
[INFO] [09:24:35.110] Sensor Maven dependencies (done) | time=30ms
[INFO] [09:24:35.110] Sensor SCM Sensor
[INFO] [09:24:35.110] Sensor SCM Sensor (done) | time=0ms
[INFO] [09:24:35.110] Sensor CPD Sensor
[INFO] [09:24:35.110] Sensor CPD Sensor (done) | time=0ms
[INFO] [09:24:35.110] No quality gate is configured.
[INFO] [09:24:35.140] Compare to previous analysis (2016-05-23)
[INFO] [09:24:35.140] Compare over 30 days (2016-04-23, analysis of Mon May 23 09:12:01 EEST 2016)
[INFO] [09:24:35.280] Execute decorators...
[INFO] [09:24:35.350] ------------- Scan titania_releases sonar.branch
[INFO] [09:24:35.350] Load module settings
[INFO] [09:24:35.370] Base dir: C:\SVN\Maven_Git\titaniadev\titania_releases
[INFO] [09:24:35.370] Working dir: C:\SVN\Maven_Git\titaniadev\titania_releases\target\sonar
[INFO] [09:24:35.370] Source paths: pom.xml
[INFO] [09:24:35.370] Source encoding: windows-1252, default locale: en_US
[INFO] [09:24:35.370] Index files
[INFO] [09:24:35.370] 0 files indexed
[INFO] [09:24:35.390] Sensor Lines Sensor
[INFO] [09:24:35.390] Sensor Lines Sensor (done) | time=0ms
[INFO] [09:24:35.390] Sensor QProfileSensor
[INFO] [09:24:35.390] Sensor QProfileSensor (done) | time=0ms
[INFO] [09:24:35.390] Sensor InitialOpenIssuesSensor
[INFO] [09:24:35.437] Sensor InitialOpenIssuesSensor (done) | time=47ms
[INFO] [09:24:35.437] Sensor ProjectLinksSensor
[INFO] [09:24:35.445] Sensor ProjectLinksSensor (done) | time=8ms
[INFO] [09:24:35.445] Sensor VersionEventsSensor
[INFO] [09:24:35.450] Sensor VersionEventsSensor (done) | time=5ms
[INFO] [09:24:35.450] Sensor Maven dependencies
[INFO] [09:24:35.457] Sensor Maven dependencies (done) | time=7ms
[INFO] [09:24:35.457] Sensor SCM Sensor
[INFO] [09:24:35.457] Sensor SCM Sensor (done) | time=0ms
[INFO] [09:24:35.457] Sensor CPD Sensor
[INFO] [09:24:35.457] Sensor CPD Sensor (done) | time=0ms
[INFO] [09:24:35.457] No quality gate is configured.
[INFO] [09:24:35.462] Compare to previous analysis (2016-05-23)
[INFO] [09:24:35.462] Compare over 30 days (2016-04-23, analysis of Mon May 23 09:12:01 EEST 2016)
[INFO] [09:24:35.592] Execute decorators...
[INFO] [09:24:35.602] ------------- Scan titania-parent sonar.branch
[INFO] [09:24:35.612] Load module settings
[INFO] [09:24:35.632] Base dir: C:\SVN\Maven_Git\titaniadev
[INFO] [09:24:35.632] Working dir: C:\SVN\Maven_Git\titaniadev\target\sonar
[INFO] [09:24:35.632] Source encoding: windows-1252, default locale: en_US
[INFO] [09:24:35.642] Sensor Lines Sensor
[INFO] [09:24:35.642] Sensor Lines Sensor (done) | time=0ms
[INFO] [09:24:35.642] Sensor InitialOpenIssuesSensor
[INFO] [09:24:35.750] Sensor InitialOpenIssuesSensor (done) | time=108ms
[INFO] [09:24:35.750] Sensor ProjectLinksSensor
[INFO] [09:24:35.760] Sensor ProjectLinksSensor (done) | time=10ms
[INFO] [09:24:35.760] Sensor VersionEventsSensor
[INFO] [09:24:35.770] Sensor VersionEventsSensor (done) | time=10ms
[INFO] [09:24:35.770] Sensor Maven dependencies
[INFO] [09:24:35.770] Sensor Maven dependencies (done) | time=0ms
[INFO] [09:24:35.770] Sensor SCM Sensor
[INFO] [09:24:35.770] Sensor SCM Sensor (done) | time=0ms
[INFO] [09:24:35.770] Sensor CPD Sensor
[INFO] [09:24:35.770] Sensor CPD Sensor (done) | time=0ms
[INFO] [09:24:35.770] No quality gate is configured.
[INFO] [09:24:35.770] Compare to previous analysis (2016-05-23)
[INFO] [09:24:35.770] Compare over 30 days (2016-04-23, analysis of Mon May 23 09:12:01 EEST 2016)
[INFO] [09:24:35.880] Execute decorators...
[INFO] [09:24:35.910] Store results in database
[INFO] [09:24:35.997] Analysis reports generated in 30ms, dir size=347 bytes
[INFO] [09:24:36.045] Analysis reports compressed in 48ms, zip size=1 KB
[INFO] [09:24:36.095] Analysis reports sent to server in 50ms
[INFO] [09:24:36.095] ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/com.cgi.titania:titania-parent:sonar.branch
[INFO] [09:24:36.095] Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] titania-parent ..................................... SUCCESS [ 23.282 s]
[INFO] personaltitania_releases ........................... SKIPPED
[INFO] titania_releases ................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 55.026 s
[INFO] Finished at: 2016-05-23T09:24:36+03:00
[INFO] Final Memory: 15M/86M
[INFO] ------------------------------------------------------------------------
SonarQube analysis completed: SUCCESS
Finished: SUCCESS
这是我的声纳仪表板:
我应该如何运行子模块的分析?或者还有其他方法吗?请帮帮我。
答案 0 :(得分:0)
在下面找到一些您可以开始调查的评论。
根据您的日志,模块也进行了扫描
Scan personaltitania_releases sonar.branch
Scan titania_releases sonar.branch
但是没有索引的文件
0 files indexed
Mabye看一下Administration Guide会揭示其他一些观点。