trautonen / coveralls-maven-plugin

Maven plugin for submitting Java code coverage reports to Coveralls web service.
MIT License
312 stars 125 forks source link

Unable to upload coveralls data from Travis build #119

Open vasilesmartup opened 6 years ago

vasilesmartup commented 6 years ago

I am using Travis PRO and Github for private repositories. When running the tests locally, data is uploaded correctly to Coveralls. However, when Travis is running builds, I am always getting this failure: [ERROR] Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:4.3.0:report (default-cli) on project web-service: 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.) -> [Help 1] I tried several configuration, with or without the token in pom.xml, etc. Currently I have this config: in .coveralls.yml:

service_name: travis-pro
repo_token: avalidtokenbutcannotputithereofcourse

and in pom.xml:

<plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <configuration>
                    <jacocoReports>
                        <jacocoReport>${project.build.directory}/jacoco-ut/jacoco.xml</jacocoReport>
                        <jacocoReport>${project.build.directory}/jacoco-it/jacoco.xml</jacocoReport>
                    </jacocoReports>
                    <failOnServiceError>false</failOnServiceError>
                </configuration>
            </plugin>

Note, build fails even if failOnServiceError is false

pkmishra commented 6 years ago

+1, I am using it for public repo and Travis CI. Error is

Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:4.3.0:report (default-cli) on 
project airbrake-log4j2: 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.) 
danglotb commented 5 years ago

Hi, I have the same issue, see this.

It appears two days ago, while I didn't touch the coveralls configuration, see this pull request passed, but when travis rebuild on the master branch after the merged, it failed with the same error, see this.

My configuration is as follow:

    <profile>
            <id>coveralls</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.eluder.coveralls</groupId>
                        <artifactId>coveralls-maven-plugin</artifactId>
                        <version>4.3.0</version>
                        <configuration>
                            <repoToken>${env.REPOSITORY_TOKEN}</repoToken>
                        </configuration>
                    </plugin>

                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>0.8.1</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>report</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

And I run: mvn -Pcoveralls -DTRAVIS_JOB_ID=$TRAVIS_JOB_ID clean test jacoco:report coveralls:report

The environment variable ${env.REPOSITORY_TOKEN} is declared in my travis settings.

Thank you.

grafjo commented 5 years ago

@danglotb had the same issue 1 our ago - and don't know what to say, it magically works now again

pzygielo commented 5 years ago

see https://github.com/lemurheavy/coveralls-public/issues/1264

danglotb commented 5 years ago

Hello, thank you for answers. It is now back to normal.

I would like to add the following Tweet, which confirms that the issue was on Travis/Coveralls side.

Thank you very much.