我們想從SonarQube分析中排除一些文件,我真的不知道我在想什麼。詳情如下:SonarQube 5.1.1,在哪裏定義文件排除模式?
- SonarQube 5.1.1
- MVN聲納:用於分析被排除
- 文件聲納現在與以下路徑的UI中可見:「的src/main/webapp的/resources/css/custom-theme/jquery-ui-1.8.23.custom.css」
我試圖通過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等東西
但是文件仍然被分析。從分析的輸出顯示排除模式被用於一些modulkes,卻忽略了別人:
不排除:
[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聲納:聲納。 配置是在項目級完成的,而不是在組件級上完成的。
感謝您提前提出您的想法。
這確實是這裏的問題。謝謝。 – user984200