# Jacoco task is skipped no matter what I do

**URL:** <https://discuss.gradle.org/t/jacoco-task-is-skipped-no-matter-what-i-do/4258>\
**Category:** Old Forum Archive\
**Created:** [February 16, 2015, 2:04pm UTC](https://discuss.gradle.org/t/jacoco-task-is-skipped-no-matter-what-i-do/4258 "2015-02-16T14:04:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johannes\_Frandsen](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@Johannes\_Frandsen](https://discuss.gradle.org/u/Johannes_Frandsen)\
**Post date:** [February 16, 2015, 2:04pm UTC](https://discuss.gradle.org/t/jacoco-task-is-skipped-no-matter-what-i-do/4258/1 "2015-02-16T14:04:00Z")

</div>

Adding this to my build script:

```gradle
apply plugin: 'jacoco'
jacocoTestReport {
    reports {
        xml.enabled true
    }
}

```

and running: gradle test jacocoTestReport

produces this result:

```gradle
:jacocoTestReport
Skipping task ':jacocoTestReport' as task onlyIf is false.
:jacocoTestReport SKIPPED

```

I’m running gradle 2.2.1

---

<div class="post-metadata">

**Author:** ![ajoberstar](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/ajoberstar/32/127_2.png) [@ajoberstar](https://discuss.gradle.org/u/ajoberstar)\
**Post date:** [February 16, 2015, 11:44pm UTC](https://discuss.gradle.org/t/jacoco-task-is-skipped-no-matter-what-i-do/4258/2 "2015-02-16T23:44:00Z")

</div>

My assumption is that you’re only running ‘jacocoTestReport’. You need to also run the test task: ‘gradlew test jacocoTestReport’.

See this discussion for background: [http://gradle.1045684.n5.nabble.com/jacoco-questions-td5712017.html](http://gradle.1045684.n5.nabble.com/jacoco-questions-td5712017.html)
