This is an automated email from the ASF dual-hosted git repository. coheigea pushed a commit to branch coheigea/error in repository https://gitbox.apache.org/repos/asf/cxf-xjc-utils.git
commit 92e1fdb6e00f0ae79723981eb1c5ae911630abc6 Author: Colm O hEigeartaigh <[email protected]> AuthorDate: Mon Oct 26 08:12:19 2026 +0000 Report model loading errors through the error listener in cxf-xjc-plugin --- .../src/main/java/org/apache/cxf/maven_plugin/XSDToJavaRunner.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/XSDToJavaRunner.java b/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/XSDToJavaRunner.java index 2bb145a..8526e31 100644 --- a/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/XSDToJavaRunner.java +++ b/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/XSDToJavaRunner.java @@ -301,7 +301,9 @@ public class XSDToJavaRunner { } catch (Exception e) { listener.error("Failed to create model", e); } catch (Throwable e) { - e.printStackTrace(); + // report it through the listener rather than printing the raw stack trace: in a forked + // process that would be outside the escaped message lines AbstractXSDToJavaMojo reads + listener.error("Failed to create model", new Exception(e)); } return null; }
