I have a project that has the following package structure
src/main/proj -com.company.package -appName -morepackages -appVers
You can define a Multi-module project structure, then you can set the configuration for sonar in one properties file in the root folder of your project, (Way #1)
Way #1