Thanks Marc. What you suggested is for using jacoco agent, something like 
this, right?
    <jacoco:dump address="172.29.12.183" port="20488" includes="..." 
destfile="${jacocoExecPath}/A.exec" reset="false" append="false"/>

Later I asked the mvn plugin scenario (for unit test): for unit test we use 
the mvn command line and jacoco-maven-plugin in pom.xml file. We do defined 
'<excludes>' in pom.xml, but it seemed to only affect the 'report' part; 
the generated .exec files were not affected. How can we include or exclude 
when dumping .exec files? I looked at the doc and seems prepare-agent can 
do this... is that true? If ture, where can I find some examples?

Do you have hints or examples for this scenario?

Thanks!
--huafeng

On Friday, November 15, 2019 at 8:45:16 PM UTC+8, Marc R. Hoffmann wrote:
>
> Ok, in this case what you typically is do when running the tests that 
> generate A.exec you limit the JaCoCo agent to the classes for A with the 
> includes property of the agent. We do the same for the JaCoCo build itself:
>
>
> https://github.com/jacoco/jacoco/blob/master/org.jacoco.report.test/pom.xml#L28
>
> Regards,
> -marc
>
>
> On 15. Nov 2019, at 13:12, [email protected] <javascript:> wrote:
>
> For example, I have two modules A and B, and two exec files A.exec and 
> B.exec. The problem is that, A.exec also contains some info about B, but 
> when generating the report, I only want the info about B from B.exec. So I 
> don't want to merge A.exec and B.exec.
> Any workaround? Thanks.
> --huafeng
>
> On Friday, November 15, 2019 at 7:35:13 PM UTC+8, Marc R. Hoffmann wrote:
>>
>> Hi Huafeng,
>>
>> no, this is not supported.
>>
>> Why can’t you provide all .exec files for the overall report? Due to 
>> unique class ids used by JaCoCo only classes in the respective group will 
>> pick-up their data. So there shouldn’t be a difference.
>>
>> Regards,
>> -marc
>>
>>
>>
>> On 15. Nov 2019, at 12:24, [email protected] wrote:
>>
>> Hi guys,
>> can I put the 'executiondata' elememt inside a 'group', as shown below? I 
>> have different .exec files for different groups.
>> Ant complains 'group doesn't support the nested "executiondata" element.' 
>> But is there a approach to use different .exec files for different groups? 
>> I do need this badly.
>>
>>     <target name="report">
>>         <jacoco:report>
>>             <structure name="JaCoCo-Report">
>>                 <group name="XXX-api">
>>                     <executiondata>
>>                         <file file="${jacocoExecPath}/XXX-api.exec"/>
>>                     </executiondata>
>>                     <group name="XXX-component-1">
>>                         <sourcefiles encoding="UTF-8">
>>                             <fileset 
>> dir="${classFilePath}/XXX/WEB-INF/classes"/>
>>                         </sourcefiles>
>>                         <classfiles>
>>                             <fileset 
>> dir="${classFilePath}/XXX/WEB-INF/classes"/>
>>                         </classfiles>
>>                     </group>
>> ...
>>
>> Thanks!
>> --huafeng
>>
>> -- 
>> 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/c13f4c95-1126-4b0e-84a1-6928ceb94349%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jacoco/c13f4c95-1126-4b0e-84a1-6928ceb94349%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>>
> -- 
> 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] <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jacoco/2c060059-2a91-4116-972a-96a389a6a1f1%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jacoco/2c060059-2a91-4116-972a-96a389a6a1f1%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
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/290d5419-af07-4b93-928e-16a8cd509552%40googlegroups.com.

Reply via email to