Skip to content
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

Merged

Conversation

MartinKanters
Copy link
Contributor

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:

  • Make sure there is a JIRA issue filed
    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.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MNG-XXX] SUMMARY, where you replace MNG-XXX
    and SUMMARY with the appropriate JIRA issue. Best practice is to use the JIRA issue
    title in the pull request title and in the first line of the commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the Core IT successfully.

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.

@@ -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();
Copy link
Contributor

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 🙈.

Copy link
Contributor Author

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? :)

Copy link
Member

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...

Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@MartinKanters MartinKanters force-pushed the MNG-7098-project-counter-cumulative branch from 3c487fa to ad656f1 Compare September 9, 2022 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants