It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Issue with clover build and report for multi module project inside docker Edited

I have a multi module project which gets compiled inside a location say, "abc/xyz/<<My_Development_Project>>/deploy/<<submodule>>"

My multi module development project has a module that uses shading and file relocation. I am using mvn clean clover:setup install to build my clover instrumented code. Each submodule then gets deployed in individual docker container through a docker_compose.yml file

My Test Code exists in same docker container inside a location say, "abc/xyc/<<My_Test_Project>>".

The build is successful. Each module now has instrument code inside 

abc/xyz/<<My_Development_Project>>/<<submodule>>/target/clover/src-instrumented

abc/xyz/<<My_Development_Project>>/<<submodule>>/target/clover/clover.db

Then I am using mvn clover aggregate to merge all the databases of the modules.

The location of merged db is:

abc/xyz/<<My_Development_Project>>/target/clover/cloverMerge.db

Problem I am facing:

1. I am not deploying any clover.db to these containers, how will they capture the code coverage data ? How to do that ?

2. When I am trying to make a report using mvn clover:clover.

It can not find the source file. It says:

/<<My_Development_Project>>/submodule/src/com/....... does not exists.

How come I update my clover report to pick actual path of my project. It is picking relative path ?

When I run this in my local machine it works fine. How can I make it work in docker container inside a particular location : abc/xyz/<<My_Development_Project>> ?

 

My Pom.xml clover plugin looks like this:

 <plugin>
<groupId>org.openclover</groupId>
<artifactId>clover-maven-plugin</artifactId>
<version>4.4.1</version>
<dependencies>
<dependency>
<groupId>org.openclover</groupId>
<artifactId>clover-maven-plugin</artifactId>
<version>4.4.1</version>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<configuration>
<generateHtml>true</generateHtml>
<jdk>1.8</jdk>
<includesTestSourceRoots>false</includesTestSourceRoots>
</configuration>
</plugin>

 

1 answer

1 accepted

0 votes
Answer accepted

I have solved the problem on my own. Thanks

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Trello

The control freak's guide: using Trello to plan a relocation

My partner and I were planning this relocation for years. It was our shared dream to try and live in another country. As children of immigrants, we already have experienced this once, but this still ...

377 views 8 13
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you