mardi 28 février 2017

Multiple Maven Projects, Single JaCoCo Site?

I am working for a company that is using multiple Maven projects/modules to create what will eventually become one product. To help me explain, imagine a file structure similar to below:

- Parent Directory
     - Project_1
           - /src/
           - /target/
           - POM.xml
     - Project_2
           - /src/
           - /target/
           - POM.xml

Along the way we are using JUnit to unit test our code, and it is an important contractual requirement that we achieve above a certain percentage threshold of code coverage with our tests.

We are using JaCoCo to generate coverage reports in the form of a HTML website. JaCoCo itself is proving to be invaluable but one major problem we have is that this creates a single site under the /target/site/jacoco/ directory.

I have done some investigating myself and found that, unless I am mistaken, JaCoCo by default does not support the ability to converge multiple Maven projects into a single JaCoCo report.

So my question is, can anybody suggest an alternative solution - something that will allow us to converge multiple reports onto a single web server?

One option we have is to move all sites into individual folders on a web server and then have an index page linking them together, but it's "clumsy" at best. For example:

- Web Server
     - index.html
     - Project_1
           - (Generated report files)
     - Project_2
           - (Generated report files)

Any better suggestions would be greatly appreciated.

Aucun commentaire:

Enregistrer un commentaire