Hi Marc,

Thank you for your answer.
I didn't know how to answer with my company's mail. So I use a personal one.

I read the web page. I understand your point of view.
Indeed with a common multi module maven. To get the generated report I have 
to execute a maven command twice.
First with the clean and test phases. And a second one with the site phase.

For the first assumption, I thought profile and the exclude property are 
sufficient to control the content of the report.
But we can change the code to add the 2 behaviors. A global aggregate 
report in the root module and the implementation of dependencies for sub 
modules. Thus if someone wants to control his aggregation, he must create 
the report module with the dependencies he has chosen.


In the wiki, the strategy aggregator is a well-known problems with maven.

I didn't have the aggregator problem using a multi module structure define 
as follows (the multi-module Enterprise Project):
https://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html
With this structure, the aggregator is executed at the end of the reactor 
plan. And the report is well generated with a single maven command : mvn 
clean test site.

module-jacoco  
          ^             ^
          |              \
          |               \
module-agregator  \
         |                  \
         |                   \
         --------- module-parent
        |             ^       ^
        |             |        \
        |             |         \
        ----------module-1  \
        |                          \
        |                           \
        ---------------------module-2

[INFO] 
------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] module-parent                                                    
[pom]
[INFO] module-1                                                           
[jar]
[INFO] module-2                                                           
[jar]
[INFO] module-aggregator                                             [pom]
[DEBUG] === REACTOR BUILD PLAN 
================================================

     

[INFO] 
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] module-parent 1.0.0-SNAPSHOT ....................... SUCCESS [ 
15.991 s]
[INFO] module-1 1.0.0-SNAPSHOT .............................. SUCCESS [  
9.893 s]
[INFO] module-2 1.0.0-SNAPSHOT .............................. SUCCESS [  
9.606 s]
[INFO] module-aggregator 1.0.0-SNAPSHOT ................ SUCCESS [ 17.180 s]
[INFO] 
------------------------------------------------------------------------
    

I need to do further tests to make sure that the build order is the nominal 
case.
And test with the dependencies implementation the option -fae to check if 
the report is generated even if some tests or packaging have failed.

Regards,
Didier Crest


-- 
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/a9523fe3-cc3d-4ba7-9ec0-5fe55c89c7d3%40googlegroups.com.

Reply via email to