1

I'm using travis CI and coveralls for a project.

I get the error Processing of input or output data failed: Report submission to Coveralls API failed with HTTP status 422: Unprocessable Entity (Couldn't find a repository matching this job.). You can see the build there.

My pom.xml :

<plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>cobertura-maven-plugin</artifactId>
            <version>2.6</version>
            <configuration>
                <outputDirectory>${basedir}/target</outputDirectory>
                <format>xml</format>
                <maxmem>256m</maxmem>
                <!-- aggregated reports for multi-module projects -->
                <aggregate>true</aggregate>
            </configuration>
        </plugin>


        <plugin>
            <groupId>org.eluder.coveralls</groupId>
            <artifactId>coveralls-maven-plugin</artifactId>
             <version>3.0.1</version>
            
            <configuration>
                <coberturaReports>
                    <coberturaReport>
                        ${basedir}/target/coverage.xml
                    </coberturaReport>
                </coberturaReports>
                <sourceEncoding>UTF-8</sourceEncoding>
                <serviceName>travis-ci</serviceName>
                <serviceJobId>${env.TRAVIS_JOB_ID} </serviceJobId>
            </configuration>
        </plugin>

I use coveralls in it's free version. Why coveralls cannot get my build ?

Thanks

Community
  • 1
  • 1
ogdabou
  • 582
  • 1
  • 10
  • 41

1 Answers1

4

Here is the solution :

The environment variable is available in the travis environment but I needed to inject it for the coveralls task.

That means adding -DTRAVIS_JOB_ID=$TRAVIS_JOB_ID in order to let it available in the pom.xml

Final line in travis.yml :

- mvn clean -DTRAVIS_JOB_ID=$TRAVIS_JOB_ID cobertura:cobertura coveralls:report

ogdabou
  • 582
  • 1
  • 10
  • 41