Skip to content

Commit

Permalink
[MNG-8140] Always tell why model was discarded as "invalid" (#1555)
Browse files Browse the repository at this point in the history
The info is there, but we redirect user to rinse-repeat in debug mode, that that creates a TON of output.

All is there, just tell why.

---

https://issues.apache.org/jira/browse/MNG-8140
  • Loading branch information
cstamas committed Jun 6, 2024
1 parent 9db546d commit dd670bf
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,10 @@ public void metadataInvalid(RepositoryEvent event) {
@Override
public void artifactDescriptorInvalid(RepositoryEvent event) {
// The exception stack trace is not really interesting here
// but the message itself may be quite details and span multiple
// lines with errors in it, so only display it at debug level.
String msg = "The POM for {} is invalid, transitive dependencies (if any) will not be available: {}";
if (logger.isDebugEnabled()) {
logger.warn(msg, event.getArtifact(), event.getException().getMessage());
} else {
logger.warn(msg, event.getArtifact(), "enable verbose output (-X) for more details");
}
logger.warn(
"The POM for {} is invalid, transitive dependencies (if any) will not be available: {}",
event.getArtifact(),
event.getException().getMessage());
}

@Override
Expand Down

0 comments on commit dd670bf

Please sign in to comment.