我正在尝试使用GraalVM和本机映像通过Github Actions编译二进制文件。到目前为止,我已经开始工作了。
但是由于我开始只包含_de.properties文件的JAR文件,所以我遇到了GraalVM无法使用正确的语言环境来解析资源的问题。
有问题的资源 org.prelle.splimo.i18n.core 仅以org.prelle.splimo.i18n.core_de.properties
的形式存在。我已经读到系统区域设置用于解析资源,这就是为什么我尝试更改环境的原因。
Github动作中的方块是
- name: Compile
run: export LC_ALL=de_DE.UTF-8; export LC_MESSAGES=de_DE.UTF-8; locale ; mvn -U -s settings.xml clean client:compile
env:
LANG: de_DE
它的输出是
Run export LC_ALL=de_DE.UTF-8; export LC_MESSAGES=de_DE.UTF-8; locale ; mvn -U -s settings.xml clean client:compile
/home/runner/work/_temp/5e196397-4957-4da6-bfa0-dcd28543ce0e.sh: line 1: warning: setlocale: LC_ALL: cannot change locale (de_DE.UTF-8): No such file or directory
locale: Cannot set LC_CTYPE to default locale: No such file or directory
LANG=de_DE
LANGUAGE=
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=de_DE.UTF-8
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[INFO] Scanning for projects...
[INFO]
以
结尾[Thu Aug 27 21:33:43 UTC 2020][INFO] Logging process [objdump] to file: /home/runner/work/Mondtor/Mondtor/target/client/log/process-objdump-1598564023270.log
[Thu Aug 27 21:33:44 UTC 2020][INFO] [SUB] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[Thu Aug 27 21:33:52 UTC 2020][INFO] [SUB] [de.rpgframework.splittermond.mondtor.mondtormain:2770] classlist: 7,636.69 ms, 1.18 GB
[Thu Aug 27 21:33:53 UTC 2020][INFO] [SUB] [de.rpgframework.splittermond.mondtor.mondtormain:2770] setup: 539.93 ms, 1.18 GB
[Thu Aug 27 21:33:53 UTC 2020][INFO] [SUB] Fatal error:java.util.MissingResourceException: Can't find bundle for base name org.prelle.splimo.i18n.core, locale en_US
[Thu Aug 27 21:33:53 UTC 2020][INFO] [SUB] at java.base/java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:2055)
[Thu Aug 27 21:33:53 UTC 2020][INFO] [SUB] at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1689)
似乎所有语言环境设置都不会影响GraalVM使用的语言环境。
有什么想法我做错了吗?