coveralls-maven-plugin: Source not found
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.
About this issue
- Original URL
- State: open
- Created 10 years ago
- Comments: 15 (3 by maintainers)
Commits related to this issue
- Deployment module was excluded from jacoco report Coveralls+Jacoco doesn't work with generated code https://github.com/trautonen/coveralls-maven-plugin/issues/57 — committed to AlexeyZhulyov/nc_edu_web-container by lazylead 8 years ago
- Try to compensate for coveralls plugin bugs. Viewing source files in Coveralls web fails, saying that the source is not found. This commit is a trick from https://github.com/trautonen/coveralls-maven... — committed to skytreader/chess-templar by skytreader 7 years ago
- Workaround for https://github.com/trautonen/coveralls-maven-plugin/issues/57 — committed to nfalco79/junit4osgi by nfalco79 7 years ago
- exclude generated code from jacoco report to prevent coveralls bug https://github.com/trautonen/coveralls-maven-plugin/issues/57 — committed to javatlacati/regextester by javatlacati 6 years ago
- added coveralls plugin configuration so it knows where to find source, I guess (https://github.com/trautonen/coveralls-maven-plugin/issues/57#issuecomment-307071887) — committed to dhoss/smough by dhoss 5 years ago
Hi, i solved the issue adding the source directory to the list of directories where coveralls searches the sources. I do not understand why coveralls plugin is not looking in the default source directory.
However, find below my working configurations:
Hello, i am encountering the same issue on a Scala project built with Maven and using Travis. Please find following my configuration in the pom.xml:
The .travis.yml
Could you please help me?
The problem is that this plugin cannot deal with any kind of code generation, because it requires the original source to be available. It is also questionable if you should run your coverage metrics based on generated code, which actually means you are testing a code generator, not your own code.
As a general solution, all generated code should be excluded from coverage tools. JaCoCo: http://www.eclemma.org/jacoco/trunk/doc/prepare-agent-mojo.html#excludes Cobertura (Instrumentation): http://www.mojohaus.org/cobertura-maven-plugin/usage.html