This is an automated email from the ASF dual-hosted git repository.

sjaranowski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-archetype.git


The following commit(s) were added to refs/heads/master by this push:
     new 24e70c4e [ARCHETYPE-676] Report warning when catalog is not parsable 
(#234)
24e70c4e is described below

commit 24e70c4e0f95d53cf20c206f3c528df9bedd723f
Author: Giovanni van der Schelde <27761321+gio...@users.noreply.github.com>
AuthorDate: Mon Oct 21 22:26:33 2024 +0200

    [ARCHETYPE-676] Report warning when catalog is not parsable (#234)
---
 .../org/apache/maven/archetype/DefaultArchetypeManager.java | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git 
a/archetype-common/src/main/java/org/apache/maven/archetype/DefaultArchetypeManager.java
 
b/archetype-common/src/main/java/org/apache/maven/archetype/DefaultArchetypeManager.java
index dae46667..56e7e54e 100644
--- 
a/archetype-common/src/main/java/org/apache/maven/archetype/DefaultArchetypeManager.java
+++ 
b/archetype-common/src/main/java/org/apache/maven/archetype/DefaultArchetypeManager.java
@@ -146,6 +146,10 @@ public class DefaultArchetypeManager extends 
AbstractLogEnabled implements Arche
 
             return source.getArchetypeCatalog(null, null);
         } catch (ArchetypeDataSourceException e) {
+            getLogger()
+                    .warn(
+                            "failed to read catalog: " + e.getMessage(),
+                            getLogger().isDebugEnabled() ? e : null);
             return new ArchetypeCatalog();
         }
     }
@@ -157,6 +161,10 @@ public class DefaultArchetypeManager extends 
AbstractLogEnabled implements Arche
 
             return source.getArchetypeCatalog(repositorySession, null);
         } catch (ArchetypeDataSourceException e) {
+            getLogger()
+                    .warn(
+                            "failed to read catalog: " + e.getMessage(),
+                            getLogger().isDebugEnabled() ? e : null);
             return new ArchetypeCatalog();
         }
     }
@@ -169,7 +177,10 @@ public class DefaultArchetypeManager extends 
AbstractLogEnabled implements Arche
 
             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();
         }
     }

Reply via email to