# SonarQube doesn't find any xml issue without sonar.sources parameter

**URL:** <https://community.sonarsource.com/t/sonarqube-doesnt-find-any-xml-issue-without-sonar-sources-parameter/46677>\
**Category:** SonarQube Server / Community Build\
**Tags:** sonarqube\
**Created:** [July 19, 2021, 3:27pm UTC](https://community.sonarsource.com/t/sonarqube-doesnt-find-any-xml-issue-without-sonar-sources-parameter/46677 "2021-07-19T15:27:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DenisPetrov](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@DenisPetrov](https://community.sonarsource.com/u/DenisPetrov)\
**Post date:** [July 19, 2021, 3:27pm UTC](https://community.sonarsource.com/t/sonarqube-doesnt-find-any-xml-issue-without-sonar-sources-parameter/46677/1 "2021-07-19T15:27:46Z")

</div>

Hello,

I created custom XPath 1.0 rule via **Track breaches of an XPath rule** for analyze XML files. All required for analyze XML files contains in _src/main/resource_ folder, whereas java code in _src/main/java_. When I run code analyze without `sonar.sources` parameter, SonarQube doesn’t go into _src/main/resource_ folder (I figured it out because I redirected terminal output into file). If I add `-Dsonar.sources=src/main/.` to analyze command, then all files are parsed and analyzed correctly, but now not all java files are analyzed(figured it out again with terminal output redirection to file).

**Details:**

- SonarQube version 8.9.1.44547
- OS = Debian
- SonarQube runes in Docker
- Java version 1.8
- Docker version 20.10.7

May be it’s my fault, thanks for help.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [July 20, 2021, 6:48pm UTC](https://community.sonarsource.com/t/sonarqube-doesnt-find-any-xml-issue-without-sonar-sources-parameter/46677/2 "2021-07-20T18:48:34Z")

</div>

Hi,

Welcome to the community!

I guess you’re using [SonarScanner for Maven](https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-maven/), right? And so by default (i.e. without the extra `sonar.sources` parameter) you get the Mavenish, Java-centric behavior: the assumption that all “code” lives under `src/main/java` and files in `src/main/resources` are just… well, “resources”.

So you’re getting the expected behavior and you’ve found exactly the right workaround/override. If you wanted, you could switch to the vanilla [SonarScanner CLI](https://docs.sonarqube.org/latest/analysis/scan/sonarscanner/), but then you’ve have to specify _everything_ manually, so I don’t think it would be worth it.

&nbsp;  
HTH,  
Ann
