Can jacoco Maven plugin be configured to generate xml report but not HTML report?

471 views
Skip to first unread message

Jon Thor Austen

unread,
Oct 17, 2022, 12:51:46 PM10/17/22
to JaCoCo and EclEmma Users
Can jacoco Maven plugin be configured to generate xml report but not HTML report?

There doesn't seem to be a config option for the pom and the "report" task is the only target task that makes sense here.

In my Azure ADO pipeline, the xml report is parsed by the pipeline, but I get an ADO error that the pipeline is going to ignore the extra HTML files (because the pipeline generates its own html report tab).

I am asking because i want to get rid of the warning by turning off HTML file output.    

OR, do i need to hack it by making a pipeline step to manually delete them?

Thanks,
Jon

Jon Thor Austen

unread,
Oct 17, 2022, 1:00:14 PM10/17/22
to JaCoCo and EclEmma Users
My first guess at a solution was to run check only.  When I try `mvn clean jacoco:check` , I get this error:

[ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.8.7:check (default-cli) on project pas-fn-v3locity-documents-api: The parameters 'rules' for goal org.jacoco:jacoco-maven-plugin:0.8.7:check are missing or invalid -> [Help 1]

Marc Hoffmann

unread,
Oct 17, 2022, 1:04:50 PM10/17/22
to JaCoCo and EclEmma Users
Hi Jon,

just have a look at our documentation:


There is the formats parameter which lets you specify the desired formats, e.g. xml only.

Regards,
-marc

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/17b69a86-4610-4c82-aff4-08a9e08e331bn%40googlegroups.com.

Jon Thor Austen

unread,
Oct 17, 2022, 1:08:46 PM10/17/22
to JaCoCo and EclEmma Users
Thanks, that worked
Reply all
Reply to author
Forward
0 new messages