enhancement
Problem
If the Java binding generation fails (Maven-Goal tl-maven-plugin:generate-java), the build ends with:
[ERROR] ... generate-java (generate-binding) ... failed: InvocationTargetException: Aborting due to previous errors
Although the generator outputs the actual cause beforehand, it is not recognizable as an error:
- SyserrProtocol outputs error and info messages unmarked(System.err.println and System.out.println respectively). They differ only in the stream - invisible in the merged Maven console. Example: No java implementation package found for module 'X'. looks like a harmless info line.
- grep-/Log-Tooling cannot find these errors via an [ERROR] pattern.
Additionally a real bug: WrapperGenerator.generateMessages() reports errors when generating a messages file only via the Log4j logger facade. As a result, no hasError is set in the log - the generator continues to run and reports success even though a file is missing.
Solution
- SyserrProtocol: add a Maven-style prefix to each line - [ERROR] for error/fatal, [INFO] for info output. BufferingProtocol remains untouched (it already separates info/error structurally; its data API must not be falsified).
- WrapperGenerator.generateMessages(): Change Logger.error(...) to _log.error(...) so that the error is recognized and leads to a correct abort.
Affected files
- com.top_logic.basic/src/main/java/com/top_logic/basic/SyserrProtocol.java
- com.top_logic.element/src/main/java/com/top_logic/element/model/generate/WrapperGenerator.java