控制maven 输出信息的语言

设置javac 输出

set JAVA_TOOL_OPTIONS=-Duser.language=en

JAVA_TOOL_OPTIONS=-Duser.language=en

如果用java/java.exe来启动JVM,那么在命令行上使用 -Duser.country=US 就可以把国家指定为美国。用javac/javac.exe来启动javac编译器则需要再多加个-J在前面,也就是 -J-Duser.country=US 。

maven-surefire-plugin 控制

复制代码
<camel.surefire.fork.vmargs>-XX:+ExitOnOutOfMemoryError -Duser.language=en -Duser.region=GB </camel.surefire.fork.vmargs>

                    <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <argLine>@{camel.surefire.fork.vmargs}</argLine>
                    </configuration>
                </plugin>

maven-compiler-plugin 控制

复制代码
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>${maven-compiler-plugin-version}</version>
            <configuration>
                <release>${jdk.version}</release>
                <maxmem>512M</maxmem>
                <fork>${compiler.fork}</fork>
                <showDeprecation>true</showDeprecation>
                <showWarnings>true</showWarnings>
                <compilerArgs>
                    <!-- SB2 actuator endpoint requires MethodParameter metadata -->
                    <arg>-parameters</arg>
                    <arg>-J-Duser.country=US</arg>
                 </compilerArgs>
            </configuration>
        </plugin>
相关推荐
coderSong25682 小时前
Java高级 |【实验八】springboot 使用Websocket
java·spring boot·后端·websocket
Mr_Air_Boy3 小时前
SpringBoot使用dynamic配置多数据源时使用@Transactional事务在非primary的数据源上遇到的问题
java·spring boot·后端
豆沙沙包?4 小时前
2025年- H77-Lc185--45.跳跃游戏II(贪心)--Java版
java·开发语言·游戏
年老体衰按不动键盘4 小时前
快速部署和启动Vue3项目
java·javascript·vue
咖啡啡不加糖4 小时前
Redis大key产生、排查与优化实践
java·数据库·redis·后端·缓存
liuyang-neu4 小时前
java内存模型JMM
java·开发语言
UFIT5 小时前
NoSQL之redis哨兵
java·前端·算法
刘 大 望5 小时前
数据库-联合查询(内连接外连接),子查询,合并查询
java·数据库·sql·mysql
怀旧,5 小时前
【数据结构】6. 时间与空间复杂度
java·数据结构·算法
大春儿的试验田6 小时前
Parameter ‘XXX‘ not found. Available parameters are [list, param1]
java