Can not exclude particular package from sonar runner(Sonar 3.3.1)

komal kadam picture komal kadam · Apr 26, 2013 · Viewed 15.8k times · Source

My project has hierarchy as :

        test-my-project>src>com.adapter
               >com.adapter.schema
               >test

I want to exclude com.adapter.schema package while running sonar.

My sonar.properties is:

sonar.properties

/#required metadata
sonar.projectKey=test:prj
sonar.projectName=test-my-project
sonar.projectVersion=1.0
/# path to source directories (required)
sonar.sources=src
/# path to project binaries (optional), for example directory of Java bytecode
/# when you build the project, where the .class files are gone
sonar.binaries=build/classes
/# The value of the property must be the key of the language.
sonar.language=java

Answer

Fabrice - SonarSource Team picture Fabrice - SonarSource Team · Apr 29, 2013

You have to use the "sonar.exclusions" property that is described in the documentation : http://docs.sonarqube.org/display/SONAR/Narrowing+the+Focus#NarrowingtheFocus-IgnoreFiles