I have a maven based project. There are four different projects like shown in the structure below. Each main project and the subprojects have their own pom.xml files.
ProjectA
|
--------subProjects
ProjectB
|
--------subprojects
ProjectC
|
--------subProjects
ProjectD
|
-------subprojects
I am running mvn site
on ProjectC
which is dependent on ProjectB
which is inter-dependent on ProjectA
and ProjectB
So when i run maven site all the test results
for all these projects get created individually
. What I would also like to do is to create a aggregation
of all the test results in these projects and sub-projects and show it in one place
.
So is it possible with maven site?
A bit different approach would be to see test results in specialized servers like Jenkins or Sonar. This way no need to modify existing projects.
See running examples at https://builds.apache.org/ and https://analysis.apache.org/
Two screenshot from Sonar:
Result by module and package
For Jenkins there is Dashboard View Plugin
Yes. There are two options:
"You can do this by setting project.build.directory on all of your projects to a common folder."
You can add extra directories to the maven-surefire-report-plugin
by adding an reportsDirectories
element with reportsDirectory
children (documentation).
So this should work:
<reportsDirectories>
<reportsDirectory>../ProjectA/target/surefire-reports</reportsDirectory>
<reportsDirectory>../ProjectA/module1/target/surefire-reports</reportsDirectory>
...
</reportsDirectories>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With