使用Jenkins执行我的sonarqube扫描仪时出现以下错误。 SonarQube =版本5.1.1 - LGPL Sonar Scanner = 2.6版
请告诉我如何在Multi Module Ant项目中排除特定模块的Java文件。 声纳属性 p>
sonar.projectKey=PROJECT
sonar.projectName=PROJECT
sonar.projectVersion=1
sonar.sources=.
sonar.modules=PROJECTb2bbackoffice,PROJECTb2bcockpits,PROJECTb2bcore,PROJECTb2bfacades,PROJECTb2binitialdata,PROJECTb2bpricefactory,PROJECTb2bstorefront,PROJECTb2btest,PROJECTb2bordermanagement
module-one.sonar.projectName=PROJECTb2bstorefront
module-one.sonar.sources=.
module-two.sonar.projectName=PROJECTb2bcore
module-two.sonar.sources=.
module-three.sonar.projectName=PROJECTb2bbackoffice
module-three.sonar.sources=.
module-four.sonar.projectName=PROJECTb2bcockpits
module-four.sonar.sources=.
module-five.sonar.projectName=PROJECTb2bfacades
module-five.sonar.sources=.
module-six.sonar.projectName=PROJECTb2binitialdata
module-six.sonar.sources=.
module-seven.sonar.projectName=PROJECTb2bpricefactory
module-seven.sonar.sources=.
module-eight.sonar.projectName=PROJECTb2btest
module-eight.sonar.sources=.
module-nine.sonar.projectName=PROJECTb2bordermanagement
module-nine.sonar.sources=.
module-nine.sonar.exclusions=PROJECTb2bordermanagement/src/com/PROJECT/b2b/ordermanagement/actions/order/cancel/*.java,PROJECTb2bordermanagement/src/com/PROJECT/b2b/ordermanagement/impl/*.java
ERROR: Error during SonarQube Scanner execution
org.sonar.squidbridge.api.AnalysisException: SonarQube is unable to analyze file : '/var/lib/jenkins/workspace/Project/module9/src/com/module/b2b/ordermanagement/actions/order/cancel/ProcessOrderCancellationAction.java'
at org.sonar.java.ast.AstScanner.simpleScan(AstScanner.java:114)
at org.sonar.java.ast.AstScanner.scan(AstScanner.java:75)
答案 0 :(得分:0)
您可以在下面尝试:
sonar-property
答案 1 :(得分:0)
我暂时没有使用配置文件。但是在maven pom我会做的不同。但我试着调整你的例子。
module-nine.sonar.projectName=PROJECTb2bordermanagement
module-nine.sonar.sources=.
module-nine.sonar.exclusions=src/com/PROJECT/b2b/ordermanagement/**/*
如果您使用**
,则会排除所有子文件夹。我只是用它们作为解释。您可以使用特定路径再次替换它们。