1

Today I've tried to connect my travis-ci with coveralls using cobertura reports. Unfortunatelly after adding cobertura to my project travis cannot succeed in building my project.

Here's exemplary build: https://travis-ci.org/bandrzejczak/activiti-console-rest/jobs/38356310

And here's my build.gradle file:

plugins {
    id 'java'
    id 'war'
    id 'idea'
    id 'net.saliman.cobertura' version '2.2.5'
    id 'com.github.kt3k.coveralls' version '2.0.1'
}

sourceCompatibility = 1.7
version = '0.0.1'

repositories {
    mavenCentral()
    maven{
        url 'http://maven.restlet.org'
    }
}

dependencies {
    //compile dependencies
    compile group: 'org.jetbrains', name: 'annotations', version: '13.0'
    compile group: 'org.activiti', name: 'activiti-engine', version: '5.15.1'
    compile group: 'org.activiti', name: 'activiti-spring', version: '5.15.1'
    compile group: 'org.restlet.jee', name: 'org.restlet', version: '2.2.1'
    compile group: 'org.restlet.jee', name: 'org.restlet.ext.spring', version: '2.2.1'
    compile group: 'org.restlet.jee', name: 'org.restlet.ext.jackson', version: '2.2.1'
    compile group: 'org.reflections', name: 'reflections', version: '0.9.8'
    compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.6'

    //runtime dependencies
    runtime group: 'mysql', name: 'mysql-connector-java', version: '5.1.31'

    //test dependencies
    testCompile group: 'junit', name: 'junit', version: '4.11'
    testCompile group: 'org.springframework', name: 'spring-test', version: '3.2.7.RELEASE'
    testCompile group: 'com.google.code.gson', name: 'gson', version: '2.3'
    testRuntime group: 'com.h2database', name: 'h2', version: '1.4.178'
    testRuntime group: 'javax.servlet', name: 'javax.servlet-api', version: '3.0.1'
}

cobertura.coverageFormats = ['html', 'xml']
Bartek Andrzejczak
  • 1,292
  • 2
  • 14
  • 27

1 Answers1

0

I've found the answer to my question but I've forgotten to post it here. My mistake came from using wrong coveralls plugin. This is what you need to use when faced with such a problem:

buildscript {
    repositories {
        mavenCentral()
    }

    dependencies {
        classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.0.0'
    }
}

apply plugin: 'com.github.kt3k.coveralls'

You can see whole build.gradle that I've used here.

Bartek Andrzejczak
  • 1,292
  • 2
  • 14
  • 27