如何使用运行sonarqube的终端命令排除用于声纳覆盖的文件?

时间:2019-03-27 08:11:39

标签: java sonarqube

我正在为应支持多个国家/地区特定更改(例如巴西和法国)的应用程序编写通用代码。

巴西有一些Java类,法国不需要。因此,为了运行声纳,我需要排除那些文件以进行声纳覆盖。另外,我将需要排除dtos,util类。

我们通常使用标签排除pom文件中类的覆盖范围。但是我需要使用mvn clean install命令排除文件。

传统方法:

enter image description here

但是我想在终端中排除如下所示的java类:

C:\Projects\web-application>mvn clean install -Dspring.profiles.active=dev -Dspring.profiles.country=brazil -Dsonar.coverage.exclusions=**/pom.xml,**/domain/dtos/**/*,**/domain/models/**/*,**/services/someClass.java

Sonarqube运行,但无法排除文件。

0 个答案:

没有答案