控制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>
相关推荐
2501_916766542 分钟前
解决idea依赖导入不成功的问题
java·intellij-idea
头发还在的女程序员5 分钟前
基于JAVA语言的短剧小程序-抖音短剧小程序
java·开发语言·小程序
vir0214 分钟前
P12155 [蓝桥杯 2025 省 Java B] 消失的蓝宝
java·职场和发展·蓝桥杯
爱笑的眼睛111 小时前
PyTorch Lightning:重新定义深度学习工程实践
java·人工智能·python·ai
Kevinyu_2 小时前
责任链模式
java·hadoop·责任链模式
明洞日记2 小时前
【设计模式手册012】责任链模式 - 请求处理的流水线艺术
java·设计模式·责任链模式
q***07142 小时前
Java实战:Spring Boot application.yml配置文件详解
java·网络·spring boot
雨中飘荡的记忆2 小时前
Spring Alibaba AI 实战指南
java·ai编程
冰封剑心2 小时前
MiniCPM-V-2_6 (4-bit 量化)使用
java·前端·数据库
mqiqe2 小时前
【Spring AI MCP】四、MCP 服务端
java·人工智能·spring