trautonen / coveralls-maven-plugin Goto Github PK
View Code? Open in Web Editor NEWMaven plugin for submitting Java code coverage reports to Coveralls web service.
License: MIT License
Maven plugin for submitting Java code coverage reports to Coveralls web service.
License: MIT License
I'm trying to integrate my Java project with coveralls and cobertura using your plugin but get the following error:
Build error: Null charset name
I've followed the instructions in the documentation, adding the cobertura-maven-plugin
and coveralls-maven-plugin
running the mvn clean cobertura:cobertura coveralls:cobertura
command.
The project can be found here: https://github.com/BoyCook/MovieService and the build here https://travis-ci.org/BoyCook/MovieService/builds
Hi,
I am using your plugin in version 3.0.0 for the following project:
xmind2latex.
Travis-CI generates and uploads reports using the following parameters:
mvn clean cobertura:cobertura org.eluder.coveralls:coveralls-maven-plugin:report
The build succeeds but when I try to browse the sources on coveralls.io, the following error is shown:
Source Not Available
Sorry, the Github API returned an internal server error, please try refreshing this page in a moment.
Do you have any idea where my configuration fails?
Best regards,
Arne
Hello,
I have a simple project to try out Travis and Coveralls using Maven and this plugin:
https://github.com/ksu-cis-501/cis501-helloworld
When using Jacoco (https://coveralls.io/builds/846183), the Coveralls source links are broken, i.e.,:
https://coveralls.io/files/218591646
When I switched to using Cobertura (https://coveralls.io/builds/858020), the plugin does not seem to find any info (https://s3.amazonaws.com/archive.travis-ci.org/jobs/27339342/log.txt):
[INFO] Writing Coveralls data to /home/travis/build/ksu-cis-501/cis501-helloworld/target/coveralls.json from coverage report /home/travis/build/ksu-cis-501/cis501-helloworld/target/site/cobertura/coverage.xml
[INFO] Successfully wrote Coveralls data in 714ms
[INFO] Gathered code coverage metrics for 0 source files with 0 lines of code:
[INFO] - 0 relevant lines
[INFO] - 0 covered lines
[INFO] - 0 missed lines
[INFO] Submitting Coveralls data to API
[INFO] Successfully submitted Coveralls data in 5872ms for Job #15.1
I do use oraclejdk8 (https://github.com/ksu-cis-501/cis501-helloworld/blob/master/.travis.yml); I'm not sure if this is the cause or there is some other misconfiguration issue.
Thanks,
Robby
I copied the Cobertura-configuration code into my pom.xml and run mvn cobertura:cobertura
. It seems to start cobertura, but no output file is generated:
...
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Library-Example 0.1-alpha-1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> cobertura-maven-plugin:2.6:cobertura (default-cli) @ Library-Example >>>
[INFO]
[INFO] --- wro4j-maven-plugin:1.4.6:run (default) @ Library-Example ---
[INFO] Executing the mojo:
...
Hi !
Thank you for your plugin, it sounds great :). But I have a problem.
I'm using travis CI and coveralls for a projec, both in free version. My projet is written in JAVA and uses Maven.
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
At least Jenkins seems to add remote name to branch, and that will break the links in Coveralls. Scanning possible remotes and removing any remote from the branch name fixes the issue. Reported in #21.
To help debugging report generation, a logging output should be created when Maven debug is enabled. The log should include total number of lines, relevant lines, covered lines and missed lines.
My project, glusterfs-java-filesystem, makes heavy use of PowerMock. As a result, Clover is the only coverage analyzer that works properly. I'd like to send reports to Coveralls and put their status image in my README.
Please consider adding support for Atlassian Clover (https://www.atlassian.com/software/clover).
Thank you in advance.
Would be nice to work with scoverage-maven-plugin or have an example in the README
Support for multi module projects (#8) easily allows support for multiple source directories, which are relevant for example Java/Scala mixed projects.
https://travis-ci.org/lightblue-platform/lightblue-applications
This project has a root pom.xml that doesn't have any source, which I suspect is the problem. There isn't anything to get coverage information from. The build fails with:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] lightblue-applications: com.redhat.lightblue.applications|pom FAILURE [ 5.499 s]
[INFO] lightblue-applications: com.redhat.lightblue.applications|apps-common SKIPPED
[INFO] lightblue-applications: com.redhat.lightblue.applications|metadata-mgmt SKIPPED
[INFO] lightblue-applications: com.redhat.lightblue.applications|data-mgmt SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.413 s
[INFO] Finished at: 2014-08-11T19:40:32+00:00
[INFO] Final Memory: 21M/186M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:2.2.0:jacoco (default-cli) on project pom: I/O operation failed: /home/travis/build/lightblue-platform/lightblue-applications/target/coveralls.json (No such file or directory) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Source is on github, but to make things easier, .travis.yml:
language: java
jdk:
- openjdk7
- oraclejdk8
after_success:
- mvn clean test jacoco:report coveralls:jacoco
And plugin configuration in the root pom.xml:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>2.2.0</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.1.201405082137</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Sometimes a build on Travis CI fails, I guess because the response of Coveralls API, is not in the expected format.
A more elaborate error message, instead of the thrown ProcessingException, might be useful, fe. 'Coveralls API was unresponsive',
or showing/logging the coveralls response, for future debugging?
Some more info on the failure :
Building, testing, code coverage goes well, but transfering the result to coveralls fails :
BTW : this test was run on my own box, not on Travis CI (hence the repository token), to get some more debug info, file paths have been obfuscated.
[...]
[INFO] Cobertura Report generation was successful.
[...]
[INFO] --- coveralls-maven-plugin:2.1.0:cobertura (default-cli) @ getback_gps ---
[INFO] Starting Coveralls job
[INFO] Using repository token
[INFO] Git commit 44a49e9 in master
[INFO] Writing Coveralls data to [HOME]/target/coveralls.json from coverage report [HOME]/target/site/cobertura/coverage.xml
[INFO] Successfully wrote Coveralls data in 482ms
[INFO] Gathered code coverage metrics for 23 source files with 5157 lines of code:
[INFO] - 1123 relevant lines
[INFO] - 276 covered lines
[INFO] - 847 missed lines
[INFO] Submitting Coveralls data to API
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
Caused by: org.eluder.coveralls.maven.plugin.ProcessingException: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
at [Source: java.io.InputStreamReader@489d479b; line: 1, column: 2]
at org.eluder.coveralls.maven.plugin.httpclient.CoverallsClient.parseResponse(CoverallsClient.java:99)
at org.eluder.coveralls.maven.plugin.httpclient.CoverallsClient.submit(CoverallsClient.java:89)
at org.eluder.coveralls.maven.plugin.AbstractCoverallsMojo.submitData(AbstractCoverallsMojo.java:300)
at org.eluder.coveralls.maven.plugin.AbstractCoverallsMojo.execute(AbstractCoverallsMojo.java:184)
... 21 more
Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
at [Source: java.io.InputStreamReader@489d479b; line: 1, column: 2]
Hello. I was attempting to use this plugin in conjunction with Codeship and it appears to not be sending the final report. The following is at the bottom of my Maven build:
[INFO] Using repository token <secret>
[INFO] Git commit c553f4e in c553f4e6db97186733c7ef42179136c63f11a431
[INFO] Writing Coveralls data to /home/rof/clone/target/coveralls.json from coverage report /home/rof/clone/target/site/cobertura/coverage.xml
[INFO] Successfully wrote Coveralls data in 358ms
[INFO] Submitting Coveralls data to API
[INFO] Successfully submitted Coveralls data in 1589ms for Job #3.1
[INFO] https://coveralls.io/jobs/210049
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 46.348s
[INFO] Finished at: Fri Jun 28 23:36:23 UTC 2013
[INFO] Final Memory: 25M/823M
[INFO] ------------------------------------------------------------------------
The report that is submitted is essentially blank. Full details of the build is available here.
Currently ServiceSetup properties override properties that are set up by Maven configuration. This is most likely not intended as ServiceSetup relies on environment variables that user might want to override some time.
I noticed you've already encountered this issue, mentioned in the comments in #15 (relevant comment). I've also encountered the issue, so I think it could probably use its own discussion thread.
See here for another build failure example.
Is this something that can be worked around by running a command of some sort before execution?
Hi, thanks for your plugin!
I've tried your plugin for my graphhopper project. I started with cobertura but nothing happens:
https://travis-ci.org/graphhopper/graphhopper/jobs/8633626
I also tried jacoco but it says:
[ERROR] Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:1.1.0:jacoco (default-cli) on project graphhopper: IO operation failed: /home/travis/build/graphhopper/graphhopper/core/target/site/jacoco/jacoco.xml (No such file or directory) -> [Help 1](the same error message I get when trying it locally)
See https://travis-ci.org/graphhopper/graphhopper/jobs/8634425
Probably I've failed to understand how to configure the named plugins ... do you have a tip? I've looked at how you did it with https://github.com/trautonen/jersey-mustache but probably have missed something
Also which do you prefer - cobertura or jacoco?
Hi there,
I'm trying to use your plugin, and from what I read on the site:
You can use JaCoCo in a multi-module project so that all modules run JaCoCo separately and let the plugin aggregate the report
well I tried this one. I have a multi-module project setup like this:
parent (no tests, no coverage)
|---- module1 (tests and coverage reports)
|---- module2 (no tests no coverage reports)
|---- module 3 (tests and coverage reports)
So what I do is I run maven from the parent project to run all my unit and integration tests and some of the modules produce results. Then after build is complete and jacoco has produced reports in some of the modules, I run maven again like this:
mvn coveralls:report
again from the parent project. However the build fails with the following error:
[ERROR] Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:3.0.1:report (default-cli) on project platform: I/O operation failed: No coverage report files found -> [Help 1]
This happens because the parent has no tests and no coverage reports. How can I can have the coveralls-maven-plugin aggregate all the reports from my modules and send it to coveralls?
Thank you
Our private maven project cannot submit data when built in the Travis-CI environment. The error is:
[INFO] Submitting Coveralls data to API
[ERROR] Failed to submit Coveralls data in 1988ms
Running the same maven command locally does work. The project has a .coveralls.yml
file with the token. I tried passing it on the command line too.
Is there anything else I can add to aid debugging?
In my pom.xml, I set JaCoCo reports to be generated in a custom location:
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.2.201409121644</version>
<configuration>
<outputDirectory>${project.reporting.outputDirectory}/${project.version}/jacoco</outputDirectory>
</configuration>
</plugin>
I also configured coveralls-maven-plugin to add the report in the same custom location:
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<jacocoReports>
<param>${project.reporting.outputDirectory}/${project.version}/jacoco</param>
</jacocoReports>
</configuration>
</plugin>
I get the following error:
[ERROR] Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:3.0.1:report (default-cli) on project uncommons-dbutils: I/O operation failed: No coverage report files found -> [Help 1]
I am working around it by generating the JaCoCo report in the default location, but it would be great if non-default locations worked, too.
Hi @trautonen,
For a long time reports for handlebars.java were wrong and now it simply doesn't work.
I opened a ticket at: lemurheavy/coveralls-public#205 but it seems coveralls is OK and they suggested to check with you :)
I made this change: jknack/handlebars.java@9cd383f to see if that help, but it doesn't.
Can you help me?
Thanks
It would be good to test what kind of Coveralls JSON the plugin creates without actually sending it to Coveralls. When dry run is enabled, the JSON would not be sent to Coveralls.
I have a project https://github.com/hazendaz/waffle. On this project, we have builds for various versions of tomcat from 5 through 8. If I run the current 3.0.1 coveralls, it will work if I exclude tomcat 7 and 8. I've tried a few variations and it seems if I run only tomcat 7 or only tomcat 8, it also works. I don't really understand what the issue might be here. We also have multiple builds like this for spring 2 through 4 and those work without issue. Any ideas?
Here is the stack trace.
[ERROR] Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:3.0.1:report (default-cli) on project waffle-parent: Build error: 247 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:3.0.1:report (default-cli) on project waffle-parent: Build error
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Build error
at org.eluder.coveralls.maven.plugin.CoverallsReportMojo.execute(CoverallsReportMojo.java:216)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 247
at org.eluder.coveralls.maven.plugin.domain.Source.addCoverage(Source.java:92)
at org.eluder.coveralls.maven.plugin.parser.JaCoCoParser.onEvent(JaCoCoParser.java:61)
at org.eluder.coveralls.maven.plugin.parser.AbstractXmlEventParser.parse(AbstractXmlEventParser.java:64)
at org.eluder.coveralls.maven.plugin.CoverallsReportMojo.writeCoveralls(CoverallsReportMojo.java:325)
at org.eluder.coveralls.maven.plugin.CoverallsReportMojo.execute(CoverallsReportMojo.java:205)
... 21 more
I used to have the following source directory: src/main/java/io.mola.galimatias
. This made coveralls unable to find sources:
[ERROR] Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:2.1.0:cobertura (default-cli) on project galimatias: Build error: Could not find source file io/mola/galimatias/Domain.java from any source directory -> [Help 1]
Changing to src/main/java/io/mola/galimatias
fixed the problem.
Failure:
https://travis-ci.org/smola/galimatias/jobs/16153713
Successful build after changing the directory structure:
https://travis-ci.org/smola/galimatias/jobs/16154263
It seems the former directory structure is increasingly common, but I'm not sure how much "standard" it is...
Coveralls tries to fetch source files by name and inner class identifiers used in file name result an unfetchable file. At the moment there is no fix for this issue. Coveralls might need to provide two fields in the api, one field for the github file and one to show in Coveralls.
Hello,
I am trying to integrate the plugin with my application(https://github.com/shekhargulati/milestogo) but getting this exception. The TravisCI build https://travis-ci.org/shekhargulati/milestogo/jobs/20308559
[ERROR] Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:2.1.0:cobertura (default-cli) on project milestogo: Processing of input or output data failed: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
Greetings,
I'm having trouble with a multiple module project. My two submodules are packaged as jar and as such have jacoco reports. My parent module is packaged as pom though, so it does not have a jacoco report. The maven coveralls plugin fails because it can not find the jacoco report for the parent project. Please advise.
If there is a better place to seek support for this issue please let me know.
Thank you very much,
-louis
After some changes coveralls made, this plugin doesn't link properly to source files, so clicking around in Coveralls website always says "SOURCE NOT AVAILABLE".
See for example project https://coveralls.io/r/NitorCreations/nflow
Relates to already closed issue #35
Coveralls Job must be set with some properties or with some property combinations to work correctly. Add validation to fail fast on misconfiguration and add proper error messages to aid user to fix the configuration.
Hi Tapio,
I was wondering why does your plugin require a token of my github account. I thought all the plugin did was gather the jacoco/cobertura results and push them to coveralls server, but I'm probably missing something.
What do you do with the password? is it used only by the plugin? is it passed on to coveralls?
Maybe this could be in the FAQ?
Also, i found the way to generate a token for my whole account, is there a way to generate one in a per-repo basis instead? I see per-repo "deploy keys" in github, but in your readme you talk about Tokens so i don't know if a deploy key would work
Thanks for the plugin!
Alejandro
Maven build timestamp allows access to the build time which can be used in the Coveralls report.
Missing source encoding property results a not very descriptive null pointer exception. This can be improved by a descriptive error message telling how to set the source encoding.
When using version 2.2.0 on travis, I get a java.lang.NullPointerException: charset while submitting:
...
Caused by: java.lang.NullPointerException: charset
at java.io.InputStreamReader.<init>(InputStreamReader.java:115)
at org.eluder.coveralls.maven.plugin.httpclient.CoverallsClient.parseResponse(CoverallsClient.java:97)
at org.eluder.coveralls.maven.plugin.httpclient.CoverallsClient.submit(CoverallsClient.java:89)
at org.eluder.coveralls.maven.plugin.AbstractCoverallsMojo.submitData(AbstractCoverallsMojo.java:307)
at org.eluder.coveralls.maven.plugin.AbstractCoverallsMojo.execute(AbstractCoverallsMojo.java:192)
Is it possible that contentType() becomes null, because the server returns something without proper charset, and you dont check for such case?
I am trying to build http://github.com/dresden-ocl/dresdenocl repository. But if I run mvn cobertura:cobertura coveralls:report
cobertura runs fine. But coveralls-maven-plugin reports a problem:
[ERROR] Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:3.0.1:report (default-cli) on project org.dresdenocl: I/O operation failed: No source found for testpackage/Class1_DefAspect_testSortedByIteratorExp01.aj -> [Help 1]
The file in question lies in /tests/org.dresdenocl.tools.codegen.ocl2java.test.aspectj/src/testpackage/constraints
so I really ask me why it is not looking into testpackage/constraints/ but in testpackage/.
Tried adding the directory to sourceDirectory but this does not help.
As you can see it is a multi module setup. Maybe you see where the problem comes from.
My maven project is in a subfolder ("bar") of my github-repository.
Now the Coveralls source-view tries to open
"src/package/foo.java"
instead of
"bar/src/package/foo.java".
I was not able to add this "base folder", neither with your plugin nor directly on Coveralls (their "Git repo root directory" option only works to cut of path-parts).
Hello,
Codeship seems to have the same error with their OpenJDK. (Similar issue as #15 (comment))
There doesn't seem to be any options to select a different JDK nor can I disable the PKCS provider since their interface does not allow sudo commands.
They are currently looking into the issue are are wondering if using OpenJDK8 would fix this problem.
Travis CI sets environment variables that can be handled in the plugin to provide less configuration for the user.
Url based source loading cannot be applied due to changes in Coveralls behavior. The file names must match names in the git repository and external mapping, like Jasmine server, cannot be used to handle for example CoffeeScript files.
Hi there,
I have the following project:
and I have configured the maven surefire AND failsafe plugins to produce results in each of the module's target folder. So to run the build I run the following in the parent folder:
mvn clean install coveralls:report -Ptest
which cleans (with success), builds(with success), executes tests(with success), generates jacoco reports(with success) in each module and then it starts executing the coveralls:report but it fails because parent has no source, no tests and hence no jacoco.xml so the coveralls plugin complains with the following:
[ERROR] Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:3.0.1:report (default-cli) on project platform: I/O operation failed: No coverage report files found -> [Help 1]
here's the stacktrace:
Caused by: java.io.IOException: No coverage report files found
at org.eluder.coveralls.maven.plugin.util.CoverageParsersFactory.createParsers(CoverageParsersFactory.java:101)
at org.eluder.coveralls.maven.plugin.CoverallsReportMojo.createCoverageParsers(CoverallsReportMojo.java:231)
at org.eluder.coveralls.maven.plugin.CoverallsReportMojo.execute(CoverallsReportMojo.java:196)
I'd like to have an attribute like 'failOnError' maybe which can be set to true or false. This way if jacoco.xml was not found the build will continue to the next modules instead of failing.
For java8 projects a newer version of jacoco is required. Also cobertura doesn't support it at all!
Check out my blog post about it:
http://javamissionary.blogspot.com/2014/08/automatic-code-coverage-badge-reports.html
I config my pom.xml equal to readme and it's not working
[INFO] Building Module Name
[INFO] task-segment: coveralls:cobertura
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to configure plugin parameters for: org.eluder.coveralls:coveralls-maven-plugin:2.0.0
Cause: Class 'java.util.List' cannot be instantiated
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring: org.eluder.coveralls:coveralls-maven-plugin. Reason: Unable to parse the created DOM for plugin configuration
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:723)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.PluginConfigurationException: Error configuring: org.eluder.coveralls:coveralls-maven-plugin. Reason: Unable to parse the created DOM for plugin configuration
at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1363)
at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:724)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:468)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
Caused by: org.codehaus.plexus.component.configurator.ComponentConfigurationException: Class 'java.util.List' cannot be instantiated
at org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter.instantiateObject(AbstractConfigurationConverter.java:121)
at org.codehaus.plexus.component.configurator.converters.composite.CollectionConverter.fromConfiguration(CollectionConverter.java:73)
at org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:247)
at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:137)
at org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56)
at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1357)
... 20 more
Caused by: java.lang.InstantiationException: java.util.List
at java.lang.Class.newInstance(Class.java:359)
at org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter.instantiateObject(AbstractConfigurationConverter.java:111)
... 25 more
Use #7 pull request as base for multi-module maven project support. Cobertura supports aggregating so it can be used with aggregate=true
.
When running Cobertura with aggregation mode set, it will generate per module reports also. There is no way the Coveralls plugin can tell if the file is an aggregate report or a non aggregate report. This can be addressed by tracking the source files added and ignore if there are duplicates.
For scala projects would be good if we can tell the plugin to use src/main/scala rather than src/main/java
The Coveralls API documentation does not cover the whole CI integration that well, but looking at their Ruby implementation a lot of things can be improved. This requires some API breakages in coveralls-maven-plugin.
When running my
after_success:
- mvn clean cobertura:cobertura coveralls:cobertura
I get error of missing HelpMojo.java
. My project is a maven plugin and HelpMojo is a generated resource by the maven-plugin-plugin. For some reason coveralls plugin fails to find it.
Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:2.0.1:cobertura (default-cli) on project drm-parent: Build error: Could not find source file com/nitorcreations/HelpMojo.java from any source directory -> [Help 1]
Project I'm working on is https://github.com/NitorCreations/DomainReverseMapper if that helps in debugging.
I have a setup with parent pom.xml with no source and modules with coverage files. Plugin fails to find coverage files with this error:
mvn clean cobertura:cobertura org.eluder.coveralls:coveralls-maven-plugin:report
[ERROR] Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:3.0.0:report (default-cli) on project nfsdb: I/O operation failed: No coverage report
files found -> [Help 1]
Project structures that are not hierarchical will result unmappable relative source file names.
|- module1\pom.xml
|- module2\pom.xml
|- parent\pom.xml
Instead of using parent project's base dir as the root, use the git root directory, because Coveralls will base the source loading on that.
Hi @trautonen,
Thanks for your work on this.
I'm one of the maintainers of the golang plugin for IntelliJ IDEA which is written in Java. As we'd like to have this up and running I've took a look at this but I couldn't figure out how we can use it for our particular project.
Do you have any hints on it?
Thank you for your time and help.
Kind regards
HttpClient 4.3 deprecates some APIs from older versions. These should refactored according to the 4.3 version.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.