我们想从SonarQube分析中排除一些文件,我真的不知道我缺少了什么。详情如下:
我试图通过SonarQube UI:->项目仪表板、->设置、->通用设置、->排除、->文件、->源文件排除来排除该文件
排除使用的模式:- src/main/webapp/resources/css/custom-theme/jquery-ui-1.8.23.custom.css - /src/main/webapp/resources/css/custom-theme/jquery-ui-1.8.23.custom.css -我们也尝试了**/resources/css/custom-theme/.css和其他东西
但文件还是会被分析。分析结果表明,排除模式用于某些模块,但对其他模块则忽略:
未排除:
[INFO] [08:05:22.015] ------------- Scan LMSTEST-UI-APPLICATION
[INFO] [08:05:22.015] Load module settings
[INFO] [08:05:22.037] Initializer FindbugsMavenInitializer
[INFO] [08:05:22.037] Initializer FindbugsMavenInitializer (done) | time=0ms
[INFO] [08:05:22.037] Base dir: /opt/ccde/jenkins_home/jobs/Build_LMSTEST_trunk/workspace/lmstest-ui/tstdatagenui-application
[INFO] [08:05:22.037] Working dir: /opt/ccde/jenkins_home/jobs/Build_LMSTEST_trunk/workspace/lmstest-ui/tstdatagenui-application/target/sonar
[INFO] [08:05:22.037] Source paths: src/main/webapp, pom.xml, src/main/java
[INFO] [08:05:22.037] Binary dirs: target/classes
[INFO] [08:05:22.037] Source encoding: windows-1252, default locale: de_DE
[INFO] [08:05:22.037] Index files
[INFO] [08:05:22.037] Excluded sources:
[INFO] [08:05:22.037] src/main/resources/**/*
[INFO] [08:05:22.050] 47 files indexed
[INFO] [08:05:22.050] 0 files ignored because of inclusion/exclusion patterns不包括:
[INFO] [08:05:21.679] ------------- Scan LMSTEST-BACKEND-EAR
[INFO] [08:05:21.679] Load module settings
[INFO] [08:05:21.700] Initializer FindbugsMavenInitializer
[INFO] [08:05:21.700] Initializer FindbugsMavenInitializer (done) | time=0ms
[INFO] [08:05:21.700] Base dir: /opt/ccde/jenkins_home/jobs/Build_LMSTEST_trunk/workspace/lmstest-backend/lmstest-backend-ear
[INFO] [08:05:21.700] Working dir: /opt/ccde/jenkins_home/jobs/Build_LMSTEST_trunk/workspace/lmstest-backend/lmstest-backend-ear/target/sonar
[INFO] [08:05:21.700] Source paths: pom.xml
[INFO] [08:05:21.700] Source encoding: UTF-8, default locale: de_DE
[INFO] [08:05:21.701] Index files
[INFO] [08:05:21.701] Excluded sources:
[INFO] [08:05:21.701] src/main/webapp/resources/css/custom-theme/jquery-ui-1.8.23.custom.css
[INFO] [08:05:21.701] **/src/main/webapp/resources/css/custom-theme/jquery-ui-1.8.23.custom.css
[INFO] [08:05:21.701] LMSTEST-UI-APPLICATION/src/main/webapp/resources/css/custom-theme/jquery-ui-1.8.23.custom.csssrc/main/webapp/resources/css/custom-theme/jquery-ui-1.8.23.custom.css
[INFO] [08:05:21.701] **/LMSTEST-UI-APPLICATION/src/main/webapp/resources/css/custom-theme/jquery-ui-1.8.23.custom.csssrc/main/webapp/resources/css/custom-theme/jquery-ui-1.8.23.custom.css
[INFO] [08:05:21.702] 1 files indexed
[INFO] [08:05:21.702] 0 files ignored because of inclusion/exclusion patterns总结我的问题:有谁知道为什么将排除模式用于对一个模块的相同分析,而不用于另一个模块。我们没有配置任何特殊的东西,它只是mvn声纳:声纳。配置是在项目级别上完成的,而不是在组件级别上完成的。
谢谢你提前提出建议。
发布于 2015-06-29 17:16:42
似乎您正在以某种方式覆盖模块级别的排除设置。看见
[INFO] [08:05:22.037] Excluded sources:
[INFO] [08:05:22.037] src/main/resources/**/*UI中在项目级别定义的设置被模块级定义的设置覆盖,然后由项目本地属性(即在pom.xml中定义的属性),然后通过命令行定义。
https://stackoverflow.com/questions/31109198
复制相似问题