2014-05-07 78 views

回答

3

而不是安裝這個插件,你可以直接使用包含或排除(或兩者)。

在一個執行pom.xml中,你可以寫pathToInclude(地產板塊內),並在控制檯中,你必須用-Dsonar.inclusions = pathToInclude

-Dsonar.inclusions=file:/path_to_my_project/MyProject.java 
//only the file above will be analyzed 

-Dsonar.exclusions=file:/path_to_my_project_root/another_directory/**/* 
//all subfolders and files within "another_directory" are exclued/ignored. 

-Dsonar.inclusions=file:/path_to_my_project/another_directory/MyProject.java 
-Dsonar.exclusions=file:/path_to_my_project/another_directory/**/* 
//all subfolders and files within "another_directory" are exclued/ignored EXCEPT MyProject.java.