diff --git a/src/main/java/org/codehaus/gmavenplus/util/ForkedGroovyCompiler.java b/src/main/java/org/codehaus/gmavenplus/util/ForkedGroovyCompiler.java index c90b2f33..9928e86e 100644 --- a/src/main/java/org/codehaus/gmavenplus/util/ForkedGroovyCompiler.java +++ b/src/main/java/org/codehaus/gmavenplus/util/ForkedGroovyCompiler.java @@ -27,9 +27,9 @@ public static void main(String[] args) { } String configFilePath = args[0]; + Log log = new SystemStreamLog(); try (ObjectInputStream ois = new ObjectInputStream(Files.newInputStream(Paths.get(configFilePath)))) { Object configuration = ois.readObject(); - Log log = new SystemStreamLog(); List classpath = Collections.emptyList(); org.codehaus.gmavenplus.model.IncludeClasspath includeClasspath = null; @@ -73,7 +73,7 @@ public static void main(String[] args) { throw new IllegalArgumentException("Unknown configuration type: " + configuration.getClass().getName()); } } catch (IOException | ClassNotFoundException | InstantiationException | IllegalAccessException | java.lang.reflect.InvocationTargetException e) { - e.printStackTrace(); + log.error(e); System.exit(1); } }