Reputation: 1933
Issue: I am trying to set the sonar-project.properties to ignore a module or a package and it doesn't work.
I am totally new to Sonar and I'm using the eclipse plugin on a java maven project and I'm trying to ignore stuff (e.g. a package or a module) but the sonar-project.properties file doesn't seem to have any effect.
I have only one properties file in the root of my project. And there are 2 modules (one for java and one for webapp)
sonar.projectKey=projectname
sonar.projectName=projectname
sonar.projectVersion=1.0
sonar.modules=javamodule,webapp
sonar.sources=src/main/
sonar.tests=src/test/java
sonar.java.binaries=target/classes
sonar.java.libraries=../*/target/**/*.jar
If I try to exclude something like
sonar.exclusions=com/package/files/**/*
or
webapp.sonar.exclusions=resources/**/*
then I do analyze on the module and nothing was ignored. I also tried adding individual properties files inside the modules..
Also, I would like to ignore the whole webapp module. Should I just not declare it, or is there some other way?
Edit:
For example's sake, this is my package structure
javamodule
- src/main/java
- com/package/files
- src/main/resources
- src/test/java
- src/test/resources
webapp
- src/main/resources
- src/main/webapp
Upvotes: 1
Views: 1120
Reputation: 3983
The SonarQube Eclipse plugin only takes into account exclusions set through the web interface. It doesn't take into account exclusions set in configuration files such as sonar-project.properties files.
Upvotes: 1