-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add a new Mojo ("report-aggregate-all") to aggregate projects from reactor without forking a lifecycle #1692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
c176f6a
to
44082a5
Compare
@Godin Hi any chance to get this merged and released? |
@@ -38,6 +38,11 @@ | |||
<groupId>${project.groupId}</groupId> | |||
<artifactId>org.jacoco.agent.rt</artifactId> | |||
</dependency> | |||
<dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with recent version of Maven this can be build before the maven plugin, so need to be sure the maven plugin is build first.
* @since 0.8.13 | ||
*/ | ||
@Parameter(defaultValue = "false", property = "jacoco.onlyReactorProjects") | ||
private boolean onlyReactorProjects; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this property called only...
and not all...
?
From the javadoc seems more appropriate to call it allReactorProjects
, or perhaps allModules
or allSubModules
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not really sure because the code currently reads only all dependencies declared in the coverage/aggregator project (dependencies that are part of the reactor).
If the flag is activated, the code will not use any current protect dependencies but only(All :))ReactorProjects.
So yes, something like allReactorProjects
would also work, except it doesn't tell the user the configuration no longer reads the project's dependencies.
Doh, this looks complicated to explain so that it might be wrong :).
no real strong opinion. @Godin what do you think?
44082a5
to
59f7f5e
Compare
@Godin ping |
@Godin any chance to have this merged or at least some comments on why this cannot be merged? |
Thanks a lot, we had a similar thing in mind. However, I would like to suggest creating a new mojo for this, and making it an aggregator mojo ( Reason: when adding the goal to a maven command like this:
you will successfully get a toplevel jacoco-report that includes all modules, however with no content at all. This is because Even worse, if you call
you do get coverage, alas, the coverage of the previous build, because A dedicated aggregator-mojo OTOH will be executed after the lifecycle:
This would also remove the need for the |
15643fc
to
3d89803
Compare
3d89803
to
b49af0d
Compare
@cpfeiffer Sorry for delay, I forgot this one. The changes should be better. |
Awesome! Would it be good practice to let |
Oh right. good catch, 2 ezy. Just pushed it. |
Excellent, thanks a lot! ❤️ |
@Godin ping :) |
33740a4
to
bf106b1
Compare
sadly, this doesn't look to attract any attention from the maintainer of the jacoco plugin. |
I hope it's just a time-issue. |
Maybe a timing issue for an idea/PR started 6 months ago... |
@cpfeiffer If you are interested, I have done this https://github.com/olamy/jacoco-aggregator-maven-plugin/ |
Dear @olamy, thanks for your contribution and very sorry for the silence from us maintainers. We (especially @Godin) mostly spend our spare time in keeping the core up-to-date. Due to our limited resources we're very reluctant to add new features which requires even more maintenance. Especially maintaining the Maven plugin is very exhausting as many community members have a strong opinion how things are done (at least in their context). We were already at the point to give-up on the integrations so that that the community can start separate projects. Questions: Can you imagine to help us with the maintenance (bug fixing, feature/bug triage etc) for the Maven goals in the long run? |
@marchof, thanks for your comment and for answering a big part of my frustration :) |
…ency Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
92528e1
to
d54fdda
Compare
@olamy As I explained above we prioritize maintenance and regular lifecycle tasks over new features. As Java 24 was released we had a strong demand by the community to have released JaCoCo version which support the latest Java release. Spending spare time on a free project only works in a friendly and respectful environment. While I understand your frustration that we haven't found time to review your PR I politely request to refrain from passive agressive statements. |
Actually having some aggregated report, need to have a module and include all dependencies of the current project.
This doesn't scale very well for large projects (Jetty can have up to more than 300 modules, we can't really add and maintain a pom with all other modules included)