Hi

Can you try with latest 3.14.x release and if still a problem with 3.17.0.

And for JMX then you should use -starter JAR instead of vanilla camel JARs
https://github.com/apache/camel-spring-boot/tree/main/components-starter/camel-management-starter




On Tue, May 24, 2022 at 12:51 PM Gaurav Verma <gauraverma1...@gmail.com>
wrote:

> Hi All,
>
> I am using Apache Camel 3.14.0 with SpringBoot and trying to generate code
> coverage report with JaCoCo xml so that SonarQube can use it to show code
> coverage. I followed all the steps mentioned in
>
> https://camel.apache.org/manual/camel-report-maven-plugin.html#_camelroute_coverage
> but still the jacoco xml file is not getting generated rather it shows the
> coverage in console.
>
> I have below dependency in my pom.xml:
>
> <dependency>
>    <groupId>org.apache.camel</groupId>
>    <artifactId>camel-management</artifactId>
>    <version>3.14.0</version>
>    <scope>test</scope>
> </dependency>
>
> My test file has below annotations:
>
> @CamelSpringBootTest
> @EnableAutoConfiguration
> @SpringBootTest(classes = MyApplication.class)
> @MockEndpoints(value = "direct:first-route")
> @EnableRouteCoverage
>
> I executed mvn test command and all the tests are passed and generated
> individual test xml file inside target/camel-route-coverage directory.
> After this, I am executing mvn camel-report:route-coverage
> -DgenerateJacocoXmlReport=true command which shows code/route coverage on
> console but doesn't generate target/site/jacoco/xmlJacoco.xml file.
>
> Due to this, I am unable to view code coverage in SonarQube.
>
> Please suggest.
>
> --
> *Thanks & Regards,*
> *Gaurav Verma*
>


-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to