Yes, I looked at examples you told me earlier but not deeply (time constraint is real pain sometimes).
Sorry, I took the wrong approach to solve my problem because when I looked at this example ( https://github.com/jacoco/jacoco/blob/v0.8.4/jacoco-maven-plugin.test/it/it-report-aggregate/report/pom.xml#L25-L62) I saw this pom's file as a parent instead of dedicated testing module. In my defense I tried to solve this way since when Jenkins triggers the build, it executes jacoco from maven plugin command line (i,e,: mvn clean package jacoco:report-aggregate sonar:sonar) and sends reports to Sonar. And dependency on parent it's really weird since it's other way around. I'll refactor my project's structure and use a dedicated module test to solve all this mess. Em segunda-feira, 20 de maio de 2019 09:03:52 UTC-3, Evgeny Mandrikov escreveu: > > > > On Monday, May 20, 2019 at 1:38:47 PM UTC+2, Fagner Fernandes wrote: >> >> Evgeny, >> >> Thanks for your reply, it helped me a lot. >> >> So I needed to add my modules in my parent project as dependencies so >> this way report-aggregate can invoke jacoco.exe in each module and append >> on a single site, right? >> > > > Have you tried to look at any of the provided examples?? > Parent is not touched in all of them, > instead they all have a dedicated module for generation of aggregated > coverage report, > where report-aggregate is bound to some phase such as "package" > and so will be executed during execution of "mvn package" or "mvn verify". > > And this is exactly what was already advised in my previous email: > > "report-aggregate" is not intended to be triggered from command-line, but >> to be declared in a dedicated module and bound to same phase > > > Because dependency of parent on its children looks incredibly weird, not > even sure that it works. > > > But if I need to excludes some classes from Jacoco's analysis I need to >> declare theses exclusions on my parent's pom or each one of my modules? >> > > > If you want to exclude classes from being shown in report generated by > "report-aggregate", then in the configuration for "report-aggregate" - > https://www.jacoco.org/jacoco/trunk/doc/report-aggregate-mojo.html#excludes > > If you want to exclude classes from being shown in report generated by > "report", then in the configuration for "report" - > https://www.jacoco.org/jacoco/trunk/doc/report-mojo.html#excludes > > -- 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/c81406ef-9258-44a7-8650-d22e37f87492%40googlegroups.com.
