# How to index thymeleaf templates in Gradle multi module project

**URL:** <https://community.sonarsource.com/t/how-to-index-thymeleaf-templates-in-gradle-multi-module-project/36162>\
**Category:** SonarQube Cloud\
**Tags:** gradle, sonarqube\
**Created:** [December 21, 2020, 8:30pm UTC](https://community.sonarsource.com/t/how-to-index-thymeleaf-templates-in-gradle-multi-module-project/36162 "2020-12-21T20:30:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sph00b](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@sph00b](https://community.sonarsource.com/u/sph00b)\
**Post date:** [December 21, 2020, 8:30pm UTC](https://community.sonarsource.com/t/how-to-index-thymeleaf-templates-in-gradle-multi-module-project/36162/1 "2020-12-21T20:30:25Z")

</div>

In the sonar cloud page of my multi module gradle project I get this warning:

> Some thymeleaf templates are not indexed : you may want to add “src/main/resources” in the scanned files of this project to detect java XSS vulnerabilities.

I have tried to add the folder in both sonar.sources and sonar.inclusions properties with several combination of asterisks but without success.

It seems I can’t make it work.

The project tree structure is the following:

> root  
> &nbsp;&nbsp;|–buildSrc  
> &nbsp;&nbsp;|–moduleA  
> &nbsp;&nbsp;|–moduleB  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|–src  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|–main  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|–java  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|–resources  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|–templates

This is the gradle build script in the root folder:

```
plugins {
    id ("org.sonarqube") version "3.0"
}

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.sonarsource.scanner.gradle","sonarqube-gradle-plugin","3.0")
    }
}

sonarqube {
    properties {
        property("sonar.sourceEncoding", "UTF-8")
        property("sonar.projectKey", "mykey")
        property("sonar.verbose", "true")
    }
}

```

---

<div class="post-metadata">

**Author:** ![Alexandre\_Holzhey](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/alexandre_holzhey/32/74760_2.png) [@Alexandre\_Holzhey](https://community.sonarsource.com/u/Alexandre_Holzhey)\
**Post date:** [January 4, 2021, 1:04pm UTC](https://community.sonarsource.com/t/how-to-index-thymeleaf-templates-in-gradle-multi-module-project/36162/2 "2021-01-04T13:04:50Z")

</div>

Hi. Please check [this topic](https://community.sonarsource.com/t/thymeleaf-templates-are-not-indexed-you-may-want-to-add-src-main-resources-in-the-scanned-files/30750/2) and our [documentation page](https://sonarcloud.io/documentation/analysis/languages/java/#analysing-jsp-and-thymeleaf-for-xss-vulnerabilities).
