title: Excluding directories from Sonar Qube scan in a multi module project in Jenkins without modifications to project
body: <p>I have created a Jenkins job which performs a SONAR QUBE analysis.
  I have added the SONAR scan as a generic build step.
  I have not made any modifications to the project to enable the SONAR integration since the project should not have to care about SONAR. (i.e. no changes to POM.xml and no properties file(s) added)</p>
  
  <p>My SONAR integration is working, without any mods necessary to the project, which is great.</p>
  
  <p>However, it is a multi module project and now I want to exclude one of the modules from the scan, since this module contains auto generated code.
  Here are the Maven commands that I’m using to trigger the SONAR scan in Jenkins:</p>
  
  <pre><code>sonar:sonar
  -Dsonar:host.url=http://url.com:9000/sonar
  -Dsonar.login=myusername
  -Dsonar.password=mypassword
  </code></pre>
  
  <p>Here is my project structure:</p>
  
  <pre><code>    root
        Project A
        Project B
        Project C
  </code></pre>
  
  <p>I want to exclude ProjectB from the scan. </p>
  
  <p>I have tried <code>-Dsonar.exclusions=/ProjectB</code> and it did not work.</p>
  
  <p>Here is an excerpt from the log:</p>
  
  <pre><code>[INFO] ------------- Scan Project B
  [INFO] Base dir: /workspace/jenkins/…/workspace/CI-JOB-NAME/projectB
  [INFO] Working dir: /workspace/jenkins/…/workspace/CI-JOB-NAME/projectB/target/sonar
  [INFO] Source paths: pom.xml, src/main/java
  [INFO] Binary dirs: target/classes
  [INFO] Source encoding: UTF-8, default locale: en_US
  [INFO] Index files
  [INFO] Excluded sources: 
  [INFO]   /projectB
  [INFO] 44 files indexed
  [INFO] 0 files ignored because of inclusion/exclusion patterns
  </code></pre>
  
  <p>As shown in the log, the excluded sources property is set but not working since it says 0 files ignored...</p>
  
  <p>Question: How do I exclude everything inside the project B directory from the scan?
  (Preferably using a command in the Jenkins job and not adding any properties files or other modifications to the project itself)</p>
  
  <p>Is the “Excluded sources path” relative to the “Base dir” path or the Root??
  Should I define the exclusion path as an absolute path?</p>