Maybe I don't understand something, but as long as class files on disk 
match class files used at runtime (see 
http://www.eclemma.org/jacoco/trunk/doc/classids.html) you should be able 
to achieve what you want as following:

cd repo1 && mvn clean jacoco:prepare-agent install 
-Djacoco.destFile=/tmp/jacoco.exec -Djacoco.append=false 
cd repo2 && mvn clean jacoco:prepare-agent install 
-Djacoco.destFile=/tmp/jacoco.exec -Djacoco.append=true
cd repo1 && mvn jacoco:report -Djacoco.dataFile=/tmp/jacoco.exec
cd repo2 && mvn jacoco:report -Djacoco.dataFile=/tmp/jacoco.exec


On Friday, December 2, 2016 at 6:29:56 PM UTC+1, Vincent Massol wrote:
>
> Hi Evgeny, 
>
> > On 02 Dec 2016, at 17:30, Evgeny Mandrikov <[email protected]> wrote: 
> > 
> > Hi, 
> > 
> > Name of a property for "report" is "jacoco.dataFile" and not 
> "jacoco.destFile" - see 
> http://www.eclemma.org/jacoco/trunk/doc/report-mojo.html#dataFile 
> > However this property was added in version 0.7.8 that is not yet 
> released (presented only in snapshot version) - see 
> http://www.eclemma.org/jacoco/trunk/doc/changes.html 
> > But prior to 0.7.8 you can define your own property as following: 
> > <plugin> 
> >   <groupId>org.jacoco</groupId> 
> >   <artifactId>jacoco-maven-plugin</artifactId> 
> >   <configuration> 
> >     <dataFile>${jacoco.dataFile}</dataFile> 
> >   </configuration> 
> > </plugin> 
>
> Thanks a lot for your answer. I’ve tried your solution and it kind of 
> worked since I was able to generate a report but the report is empty. Is it 
> because the project where the report is generated from also needs to 
> contain the sources matching the generated data in jacoco.exec? If so, then 
> I don’t see how I could achieve the use case I described. 
>
> Would you have any idea about how to achieve it? 
>
> Thanks again 
> -Vincent 
>
> > 
> > HTH, 
> > Evgeny 
> > 
> > On Friday, December 2, 2016 at 1:02:41 PM UTC+1, [email protected] 
> wrote: 
> > Hi guys, 
> > I have the following setup: 
> > - github repo 1 (https://github.com/xwiki/xwiki-commons) 
> > - github repo 2 (https://github.com/xwiki/xwiki-rendering) 
> > 
> > I'd like to have a report that combines all the coverage generated by 
> all tests from all modules (including coverage generated by modules on 
> other modules) for both repos. 
> > 
> > So I execute the following: 
> > - on repo1: mvn clean jacoco:prepare-agent install 
> -Djacoco.destFile=/tmp/jacoco.exec -Djacoco.append=false 
> > - on repo2: mvn clean jacoco:prepare-agent install 
> -Djacoco.destFile=/tmp/jacoco.exec -Djacoco.append=true 
> > 
> > So this should generate a combined jacoco.exec that contains everything. 
> > 
> > However I can't find a way to generate a report out the exec file. 
> > 
> > If I run "mvn jacoco:report -Djacoco.destFile=/tmp/jacoco.exec -N" then 
> I get "Skipping JaCoCo execution due to missing execution data file.". 
> > 
> > This suggest that I may not be using this properly. 
> > 
> > However I can't find a way to do what I want. 
> > 
> > Any idea? 
> > 
> > PS: Thanks a lot for this great tool! 
> > 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/0dd1ae39-e627-4c07-9b15-daa4d971f4b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to