[MNG-8140] Always tell why model was discarded as "invalid" (#1555)

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
This commit is contained in:
Tamas Cservenak 2024-06-06 21:10:58 +02:00
parent 9db546ddb9
commit dd670bf9a1
1 changed files with 4 additions and 8 deletions

View File

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