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
[MNG-7098] Keep the project counter intact when resuming a multi-module project. #783
[MNG-7098] Keep the project counter intact when resuming a multi-module project. #783
Conversation
@@ -143,7 +143,11 @@ public void sessionStarted( ExecutionEvent event ) | |||
project.getName(), chars( ' ', ( len > 0 ) ? len : 1 ), project.getPackaging() ); | |||
} | |||
|
|||
totalProjects = projects.size(); | |||
final List<MavenProject> allProjects = event.getSession().getAllProjects(); |
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.
Perhaps it might be worth noting that the MavenSession#getAllProjects()
states This is a provisional method and may be removed
. However long that may have been there 🙈.
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.
Yeah that's a good point. It's been there since 2014, though and the documentation of the member field shows exactly what we need :)
/**
* The full set of projects before any potential constraining by --projects. Useful in the case where you want to
* build a smaller set of projects but perform other operations in the context of your reactor.
*/
I'm inclined to keep it, what do you think? :)
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.
As hard as it sounds, I deprecation without even a slight note is quite useless...
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.
It makes sense to me to keep using this method. Perhaps the comment could be removed to avoid confusion as it is not annotated with @Deprecated
and it is used in multiple places. I agree that these kind of "deprecation messages" are quite useless indeed.
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.
Makes sense, but I am not sure what the policy is on that. @michael-o Should I remove it as suggested, what do you think?
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 would at least raise a JIRA issue.
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.
A JIRA for removing that method and adding the JIRA number into the TODO?
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.
Yes
maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java
Outdated
Show resolved
Hide resolved
3c487fa
to
ad656f1
Compare
8411a00
to
5008cfc
Compare
This PR ensures that when a multi module project is resumed halfway, the project progress counter is not reset.
Related issue.
Following this checklist to help us incorporate your
contribution quickly and easily:
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes.
[MNG-XXX] SUMMARY
, where you replaceMNG-XXX
and
SUMMARY
with the appropriate JIRA issue. Best practice is to use the JIRA issuetitle in the pull request title and in the first line of the commit message.
mvn clean verify
to make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.