Hi Huafeng, you can define the excludes in a file and reference this file with the excludesfile property of FileSet. See Ant documentation: https://ant.apache.org/manual/Types/fileset.html <https://ant.apache.org/manual/Types/fileset.html>
Regards, -marc > On 29. Oct 2019, at 03:34, [email protected] wrote: > > hi, > > I was using 'ant -buildfile build.xml report' to generate html report. Part > of build.xml looks like this. Clearly the <exclude>s are inside each > <fileset> of <classfiles>. My question is, can all these <exclude>s be put > together outside the <classfiles><fileset>, in the 'top level' of <group > name="my-hello-api-top">? If so, how would build.xml look like? > > <target name="report"> > <jacoco:report> > <executiondata> > <file file="${jacocoExecPath}/merged.exec"/> > </executiondata> > > <structure name="JaCoCo Report"> > <group name="my-hello-api-top"> > <group name="my-hello-api"> > <sourcefiles encoding="UTF-8"> > <fileset > dir="${classFilePath}/my-hello-api-version/WEB-INF/classes"/> > </sourcefiles> > <classfiles> > <fileset > dir="${classFilePath}/my-hello-api-version/WEB-INF/classes"> > <exclude > name="com/my/hello/api/debug/**/*.class"/> > <exclude > name="com/my/hello/api/downgrade/*.class"/> > <exclude > name="com/my/hello/api/base/*.class"/> > </fileset> > </classfiles> > </group> > <group name="my-hello-component"> > <sourcefiles encoding="UTF-8"> > <fileset > dir="${classFilePath}/my-hello-api-version/WEB-INF/lib/my-hello-component"/> > </sourcefiles> > <classfiles> > <fileset > dir="${classFilePath}/my-hello-api-version/WEB-INF/lib/my-hello-component"/> > </classfiles> > </group> > <group name="my-hello-model"> > <sourcefiles encoding="UTF-8"> > <fileset > dir="${classFilePath}/my-hello-api-version/WEB-INF/lib/my-hello-model"/> > </sourcefiles> > <classfiles> > <fileset > dir="${classFilePath}/my-hello-api-version/WEB-INF/lib/my-hello-model"> > <exclude name="com/my/hello/**/*.class"/> > </fileset> > </classfiles> > </group> > </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] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jacoco/581390c2-c2cb-447d-9c83-ea49a95dcc2d%40googlegroups.com > > <https://groups.google.com/d/msgid/jacoco/581390c2-c2cb-447d-9c83-ea49a95dcc2d%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/FE8014F2-00D3-45E3-9079-D0B0AF6436EB%40mountainminds.com.
