# Gradle sonarqube not able to find class files / source files

**URL:** <https://discuss.gradle.org/t/gradle-sonarqube-not-able-to-find-class-files-source-files/21059>\
**Category:** Help/Discuss\
**Tags:** sonarqube\
**Created:** [January 8, 2017, 7:18pm UTC](https://discuss.gradle.org/t/gradle-sonarqube-not-able-to-find-class-files-source-files/21059 "2017-01-08T19:18:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_Ahrer](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/martin_ahrer/32/9977_2.png) [@Martin\_Ahrer](https://discuss.gradle.org/u/Martin_Ahrer)\
**Post date:** [January 8, 2017, 7:18pm UTC](https://discuss.gradle.org/t/gradle-sonarqube-not-able-to-find-class-files-source-files/21059/1 "2017-01-08T19:18:51Z")

</div>

I have a multi-language project with tests implemented using Java (JUnit) and Groovy (Spock).

```
plugins {
    id "org.sonarqube" version "2.2.1"
}

apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'jacoco'

ext {
    spockVersion = '1.1-groovy-2.4-rc-3'
    groovyVersion = '2.4.7'
}

group = "at.softwarecraftsmen.poc"
version = "1.0.0-SNAPSHOT"

repositories {
    mavenCentral()
}

dependencies {
    testCompile "junit:junit-dep:4.11"

    testCompile "org.codehaus.groovy:groovy-all:$groovyVersion"
    testCompile "org.spockframework:spock-core:$spockVersion"
}

jacoco {
    toolVersion = "0.7.8+"
}

sonarqube {
    properties {
        //property 'sonar.tests', ["src/test/groovy", "src/test/java"]
        properties['sonar.tests'] += ["src/test/groovy"]
    }
}

```

When running the sonarqube task, it runs successfully but reports a `Resource not found: at.softwarecraftsmen.poc.sonar.domain.DomainTesteeSpec`. This is a Spock test using Groovy.

Here is the full log output from produced by Gradle:

```
$ gradle sonarqube
:compileJava UP-TO-DATE
:compileGroovy UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:compileTestJava UP-TO-DATE
:compileTestGroovy UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test UP-TO-DATE
:sonarqube
Resource not found: at.softwarecraftsmen.poc.sonar.domain.DomainTesteeSpec
CodeNarc completed: (p1=0; p2=0; p3=0) 1082ms
Resource not found: at.softwarecraftsmen.poc.sonar.domain.DomainTesteeUnitTest
File not found: at/softwarecraftsmen/poc/sonar/domain/DomainTestee.java
Coverage information was not collected. Perhaps you forget to include debug information into compiled classes?
File not found: at/softwarecraftsmen/poc/sonar/domain/DomainTestee.java
Coverage information was not collected. Perhaps you forget to include debug information into compiled classes?

BUILD SUCCESSFUL

```

Adding `properties['sonar.tests'] += ["src/test/groovy"]` does not fix the problem, only tests from `src/test/java` are reported properly.

```
------------------------------------------------------------
Gradle 3.3
------------------------------------------------------------

Build time: 2017-01-03 15:31:04 UTC
Revision: 075893a3d0798c0c1f322899b41ceca82e4e134b

Groovy: 2.4.7
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_71 (Oracle Corporation 25.71-b15)
OS: Mac OS X 10.11.6 x86_64
```

---

<div class="post-metadata">

**Author:** ![gonzalez-lee](https://avatars.discourse-cdn.com/v4/letter/g/65b543/32.png) [@gonzalez-lee](https://discuss.gradle.org/u/gonzalez-lee)\
**Post date:** [January 15, 2018, 2:06am UTC](https://discuss.gradle.org/t/gradle-sonarqube-not-able-to-find-class-files-source-files/21059/2 "2018-01-15T02:06:53Z")

</div>

> [@Martin\_Ahrer](#):
>
> 75893a3d0798c0c1f322899b41ceca82

Hi Martin,

I encountered the same problem. How did you solved it finally?
