Mutli-Module Maven Project - war + jar + jar. All POMs with different parents

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Mutli-Module Maven Project - war + jar + jar. All POMs with different parents

erix
This post has NOT been accepted by the mailing list yet.
I hope someone could just tell me whether this is even possible.

We have a multi-module maven project. I just learned that the structure is like this:

Web Service XYX
+- pom.xml
 +- Web Module (war)
 +- pom.xml (parent pom is Company WebService Parent)
 +- API Module (jar)
 +- pom.xml (parent pom is Company API Parent)
 +- API Implementation (jar)
 +- pom.xml (parent pom is Company API IMPL Parent)

What I have done is setup UT and IT Code Coverage from Jacoco to Sonar via Jenkins. The UT Coverage gets sent to Sonar correctly for the UT combined. The IT Coverage is always 0%. My IT is run against the Web Module after starting the war up using the maven tomcat plugin. The code that it should be exercising lives inside the module API Implementation. Even though a jacoco-it.exec file was generated and analyzed by sonar, it always shows me that no lines of code were hit. Is there a way to actually do this?

BTW - I know it can be done because this article indicates exactly what I need: http://www.sonarqube.org/measure-code-coverage-by-integration-tests-with-sonar/

However, the article fails to mention if the modules are referred to the same parent in the project. I'm making an assumption that it does.