-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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-8069] add failing projects if a project is banned from reactor #1435
base: maven-3.9.x
Are you sure you want to change the base?
Conversation
Currently if a multimodule build fails (either fast or at the end), the user gets a message in the log that reads: "This project has been banned from the build due to previous failures." this is correct but does not give a hint what has failed and one needs to investigate the build logs to get more details. This now instead shows as part of the message the actual project that make it impossible to build this one and is the reason for this project being banned.
Wouldn't it be better to add the cause when the project is banned rather than trying to reconstruct it later ? I wonder if we should enhance the Also, what about providing two slightly different messages, I think it's interesting to know if the project has been skipped because one project has failed (without the fail-at-end flag, do we actually need to display the failing projects for each skipped project, even unrelated ?) or it's actually an upstream project which caused the failure ? |
The problem is that if you have a multimodule build (lets say 300 modules) and use multithreading (so build messages are interleaved), and one of the projects fail in the middle you have a huge logfile full of "banned" messages but you need to find out what/where it actually fails, so the message without any context is quite useless and even if you find the erroneous project its not very helpful. So I though showing it at tat time might be more useful. Another approach would be to simply not display the message at all, and instead give a summary at the end of build, e.g.
sadly currently this information is somehow spread across some places and I'm not sure why e.g. a listener was used instead of printing the message directly on regarding |
if (MavenExecutionRequest.REACTOR_FAIL_AT_END.equals(session.getReactorFailureBehavior()) | ||
&& projectDependencyGraph != null) { | ||
|
||
// the project is blacklisted only so one of its upstreams must have failed here... |
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 can't quite follow this comment, please rephrase
// the project is blacklisted only so one of its upstreams must have failed here... | ||
upstreamProjects = projectDependencyGraph.getUpstreamProjects(event.getProject(), true); | ||
} else { | ||
// any other failure must have lead to this so any projects is eligible |
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.
are eligible
Currently if a multimodule build fails (either fast or at the end), the user gets a message in the log that reads:
"This project has been banned from the build due to previous failures."
this is correct but does not give a hint what has failed and one needs to investigate the build logs to get more details.
This now instead shows as part of the message the actual project that make it impossible to build this one and is the reason for this project being banned.
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 replace
MNG-XXX
andSUMMARY
with the appropriate JIRA issue.[MNG-XXX] SUMMARY
.Best practice is to use the JIRA issue title in both 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.