Skip to content

Commit

Permalink
[ARCHETYPE-676] Report warning when catalog is not parsable (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
Giovds authored Oct 21, 2024
1 parent 3f65ed4 commit 24e70c4
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ public ArchetypeCatalog getInternalCatalog() {

return source.getArchetypeCatalog(null, null);
} catch (ArchetypeDataSourceException e) {
getLogger()
.warn(
"failed to read catalog: " + e.getMessage(),
getLogger().isDebugEnabled() ? e : null);
return new ArchetypeCatalog();
}
}
Expand All @@ -157,6 +161,10 @@ public ArchetypeCatalog getLocalCatalog(RepositorySystemSession repositorySessio

return source.getArchetypeCatalog(repositorySession, null);
} catch (ArchetypeDataSourceException e) {
getLogger()
.warn(
"failed to read catalog: " + e.getMessage(),
getLogger().isDebugEnabled() ? e : null);
return new ArchetypeCatalog();
}
}
Expand All @@ -169,7 +177,10 @@ public ArchetypeCatalog getRemoteCatalog(

return source.getArchetypeCatalog(repositorySession, remoteRepositories);
} catch (ArchetypeDataSourceException e) {
getLogger().warn("failed to download from remote", e);
getLogger()
.warn(
"failed to download from remote" + e.getMessage(),
getLogger().isDebugEnabled() ? e : null);
return new ArchetypeCatalog();
}
}
Expand Down

0 comments on commit 24e70c4

Please sign in to comment.