Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to set multiple source locations in Sonar Server?
    text
    copied!<p>I'm using Maven 3 and in my java project, the pom file contains one source location as follows.</p> <pre><code>&lt;build&gt; &lt;sourceDirectory&gt;src/main/java&lt;/sourceDirectory&gt; &lt;testSourceDirectory&gt;src/test/java&lt;/testSourceDirectory&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;source&gt;${JDK}&lt;/source&gt; &lt;target&gt;${JDK}&lt;/target&gt; &lt;excludes&gt; &lt;!--&lt;exclude&gt;**/**/api/notification/**/INotificationProfileManager.java&lt;/exclude&gt; --&gt; &lt;/excludes&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-ejb-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;version&gt;1.3&lt;/version&gt; &lt;archive&gt; &lt;manifest&gt; &lt;addDefaultSpecificationEntries&gt;true&lt;/addDefaultSpecificationEntries&gt; &lt;addDefaultImplementationEntries&gt;true&lt;/addDefaultImplementationEntries&gt; &lt;/manifest&gt; &lt;manifestEntries&gt; &lt;Class-Path&gt;./MubarsherTradeClasspath-1.0.jar&lt;/Class-Path&gt; &lt;Specification-Vendor&gt;Mubasher&lt;/Specification-Vendor&gt; &lt;Implementation-Vendor&gt;Mubasher&lt;/Implementation-Vendor&gt; &lt;Sealed&gt;false&lt;/Sealed&gt; &lt;/manifestEntries&gt; &lt;/archive&gt; &lt;/configuration&gt; &lt;/plugin&gt; </code></pre> <p>After compiling, the generated files are located in <code>.../generate/src/main/java/...</code> path. When <strong>Sonar</strong> analysis is done, it checks these generated classes which themselves have a <code>../src/main/java/...</code> path, so the analysis fails.</p> <p>So I need to know how to define multiple source paths to analyze from sonar ?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload