Class JavacCompiler.Messages
java.lang.Object
org.codehaus.plexus.compiler.javac.JavacCompiler.Messages
- Enclosing class:
JavacCompiler
Multi-language compiler messages to parse from forked javac output.
- OpenJDK 8+ is delivered with 3 locales (en, ja, zh_CN).
- OpenJDK 21+ is delivered with 4 locales (en, ja, zh_CN, de).
new JavacMessages("com.sun.tools.javac.resources.javac", Locale.getDefault())
.getLocalizedString("javac.msg.proc.annotation.uncaught.exception")
Hoewever, due to JMS module protection, it would be necessary to run Plexus Compiler (and hence also Maven
Compiler and the whole Maven JVM) with --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
on more recent JDK versions. As this cannot be reliably expected and using internal APIs - even though stable
since at least JDK 8 - it is not a future-proof approach. So we refrain from doing so, even though during Plexus
Compiler development it might come in handy.
TODO: Check compiler.properties and javac.properties in OpenJDK javac source code for message changes, relevant new messages, new locales.
- Author:
- Trygve Laugstøl, Matthew Pocock, Jörg Waßmer, Alexander Kriegisch, Others
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String[]protected static final String[]protected static final String[]protected static final String[]protected static final String[]protected static final String[]protected static final String[]protected static final String[]protected static final String[]protected static final String[]protected static final String[]protected static final String[] -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
ERROR_PREFIXES
-
WARNING_PREFIXES
-
NOTE_PREFIXES
-
MISC_PREFIXES
-
JAVAC_GENERIC_ERROR_PREFIXES
-
VM_INIT_ERROR_HEADERS
-
BOOT_LAYER_INIT_ERROR_HEADERS
-
ANNOTATION_PROCESSING_ERROR_HEADERS
-
FILE_A_BUG_ERROR_HEADERS
-
SYSTEM_OUT_OF_RESOURCES_ERROR_HEADERS
-
IO_ERROR_HEADERS
-
PLUGIN_ERROR_HEADERS
-
-
Constructor Details
-
Messages
protected Messages()
-