Hi Ankit, this is not the way how it works. The agent always creates exec files, even if you name them “xml”.
To create a xml report you need to run the report task. Please read the documentation <https://www.jacoco.org/jacoco/trunk/doc/ant.html>. Regards, -marc > On 3. Feb 2022, at 13:44, ankit daruka <ankit.dar...@gmail.com> wrote: > > Hi Marc, > > Below is my build.xml file which I was using successfully for exec file > format. I have only changed the file format from exec to xml in destfile > attribute of below file. > > <project name="jacoco_rpt_pim" xmlns:jacoco="antlib:org.jacoco.ant"> > <property name="platformhome" location="."/> > > <target name="jacocoalltests" description="run jacoco"> > <ant dir="${platformhome}" target="unittests" > inheritrefs="false"> > <property name="testclasses.suppress.junit.tenant" > value="true"/> > <property name="standalone.javaoptions" > value="-javaagent:${platformhome}/lib/jacocoagent.jar=destfile=${HYBRIS_BIN_DIR}/platform/reports.xml,append=false,excludes=com.google.*:com.sun.*:de.hybris.platform.*" > /> </ant> > </target> > </project> > > I am using the below command for running the jacocoalltests target > Command: ant -buildfile build.xml jacocoalltests > -Dtestclasses.extensions=${unitTestExtensions} > > Can you suggest what other changes are required to get the correct xml file. > > Thanks > > On Thursday, 3 February 2022 at 18:08:04 UTC+5:30 Marc R. Hoffmann wrote: > Hi Ankit, > > what you’re showing in the screen shot is definitely not a XML file. It more > looks like a binary exec file. > > Please see the examples in our documentation > <https://www.jacoco.org/jacoco/trunk/doc/> how to create an XML report with > Ant: https://www.jacoco.org/jacoco/trunk/doc/examples/build/build.xml > <https://www.jacoco.org/jacoco/trunk/doc/examples/build/build.xml> > > Best regards, > -marc > > >> On 3. Feb 2022, at 12:21, ankit daruka <ankit....@gmail.com >> <applewebdata://3BC33F1C-951B-4FD2-B976-11DB84434745>> wrote: >> > >> Hi Team, >> >> I am using Jacoco integration with Ant in my Hybris project. It was working >> fine until the report was generating in exec format. But, after the sonar >> upgrade, exec format is deprecated and we have to move to xml report format. >> >> I have made the below property changes for getting the report in xml format. >> The report is generated at the desired location in xml format, but the >> content seems to be in encoded format. Can you help me with the steps needed >> to migrate from exec to xml format. >> >> Property used : >> sonar.coverage.jacoco.xmlReportPaths=hybris/log/junit/jacocoReports.xml >> >> Please find the screenshot of the xml getting generated. Please suggest any >> changes required to fix the issue. >> >> Thanks, > >> Ankit Daruka >> <JacocoReports_SS.PNG> >> >> -- >> 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 jacoco+un...@googlegroups.com >> <applewebdata://3BC33F1C-951B-4FD2-B976-11DB84434745>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jacoco/aa3efb49-d166-4a42-ab42-60dbbe537f4cn%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jacoco/aa3efb49-d166-4a42-ab42-60dbbe537f4cn%40googlegroups.com?utm_medium=email&utm_source=footer>. >> <JacocoReports_SS.PNG> > > > -- > 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 jacoco+unsubscr...@googlegroups.com > <mailto:jacoco+unsubscr...@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jacoco/176c168f-7a25-4654-ba74-075e53cd8411n%40googlegroups.com > > <https://groups.google.com/d/msgid/jacoco/176c168f-7a25-4654-ba74-075e53cd8411n%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 jacoco+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/A69C3271-B10E-4176-95B1-760916D3D2F9%40mountainminds.com.