title: Sonar error in multi language project: File can't be indexed twice
body: <p>I'm trying to setup sonar to analyze both java and javascript sources.
  I have a standard structure maven project.
  Following <a href="https://github.com/SonarSource/sonar-examples/tree/master/projects/languages/multi-language/multi-language-java-javascript-maven" rel="nofollow noreferrer">THIS</a> example I've added the line</p>
  
  <pre><code>&lt;properties&gt;
      &lt;sonar.sources&gt;src&lt;/sonar.sources&gt;
  &lt;/properties&gt;
  </code></pre>
  
  <p>But when I run </p>
  
  <blockquote>
    <p>mvn clean install sonar:sonar</p>
  </blockquote>
  
  <p>I get the following error</p>
  
  <blockquote>
    <p>[ERROR] Failed to execute goal
    org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (default-cli) on
    project myproject: File [moduleKey=myproject:myproject,
    relative=src/test/java/com/myproject/api/v1/ControllerTest.java,
    basedir=C:\sources\project] can't be indexed twice. Please check that
    inclusion/exclusion patterns produce disjoint sets for main and test
    files -> [Help 1]</p>
  </blockquote>
  
  <p>"ControllerTest.java" is the first file in the /src/test/java/../.. folder</p>
  
  <p>project structure:</p>
  
  <p><img src="https://i.stack.imgur.com/AfP1w.png" alt="enter image description here"></p>
  
  <p>Any hints? Thanks in advance for any help!</p>
  
  <p>UPDATE</p>
  
  <p>1#
  Tried Akash Rajbanshi suggestion: error disappeared but js code is not analyzed and also sonar doesn't analyze the test folder</p>
  
  <p>2# tried to put <code>&lt;sonar.language&gt;js&lt;/sonar.language&gt;</code> and the js code is actually analyzed but java code is not (that was just a test)</p>
  
  <p>I'm kind of stuck</p>