Closed velo closed 9 years ago
@velo are you using this modification so that you add one custom root directory to configuration, which is the parent of the actual source modules, and when the scanloader kicks in it picks up the sources? Do you use cobertura or jacoco as the coverage tool, because I was wondering if the cross module coverage gets calculated correctly in your case?
Yes, I do.
I'm using jacoco.
After my build finished, I run org.jacoco:jacoco-maven-plugin:0.7.x:merge to aggregate all reports and later coveralls-maven-plugin to create coveralls.
Based on the numbers I have per module, feels it is calculating correctly. I never put it under a rigorous check, but when I look into the numbers they do feel solid.
Ok nice to know. One thing I'm still wondering... the plugin scans all reactor maven projects (submodules and their submodules and so on), this should make sources visible for all modules that are part of the root project. I guess in your case the test project is not in same project hierarchy than the modules under test, is that correct? Just making sure the use case is solid and I can create correct documentation.
And one more thing... there's issue #64 with quite similar use case. I've never used the jacoco's merge goal so if you could give a small example there how to put all that together with the coveralls plugin that would be awesome.
the module that aggregates and write cobertura reports is not on reactor.
Cause I need it to run after all other, and there is no way to say this module depends on all other (unless I add the dependencies, but then project evolve, new modules come to life and would need to remember to update this dependency list)
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.1.201405082137</version>
<executions>
<execution>
<id>merge-tests</id>
<phase>compile</phase>
<goals>
<goal>merge</goal>
</goals>
<configuration>
<fileSets>
<fileSet>
<directory>${project.build.directory}/../..</directory>
<includes>
<include>**/*.exec</include>
</includes>
</fileSet>
</fileSets>
<destFile>${project.build.directory}/jacoco.exec</destFile>
</configuration>
</execution>
Great! That's what I thought. And thanks for all the help. The pull request looked quite nice and I'll try to get time to go through it once more and release it along with 3.1.0.
Thanks =D
hi @trautonen any update?
@velo sorry for the delay, been dead busy lately. Now everything should be up to date in Sonatype's repo. Could you verify that your builds are working with the latest 3.1.0-SNAPSHOT. I can then release if everything is fine.
No problem, I made an internal release with this and I'm using for quite a while.
Hi,
I have a huge project, with integration tests. The integration tests are on project C but they to test code from projects A and B, so I needed a way to scan for source files, so I do not had to add all source folder to my pom.