控制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>
相关推荐
伯恩bourne3 小时前
对比 @Configuration(Full) vs @Component(Lite)
java·开发语言
RuoyiOffice3 小时前
达梦 DM8、openGauss、人大金仓怎么选?RuoYi Office 国产数据库适配与验收指南
java·数据库·spring boot·架构·信创
修船大队长3 小时前
KL15 高电平请求 FullCom:AUTOSAR 项目调用流程
android·java·服务器
棉猴3 小时前
玩游戏学Python12-布尔型与条件语句
java·前端·python·玩游戏·游戏编程·pgzero
java_nnnn3 小时前
Spring Web MVC 入门:从一个 URL 到 Java 后端完整处理请求
java·前端·spring boot·spring
Mikko73 小时前
fastjson 1.2.84 能在 JDK 7 上跑吗?实测:编译能过,一启动就 UnsupportedClassVersionError
java·后端·jdk·fastjson·安全漏洞
G018_star sky♬3 小时前
为什么java新建一个对象,需要obj o = new obj()这种写法
java·开发语言
驭渊的小故事6 小时前
MyBatis XML 开发实战:从配置到 CRUD 全解析
xml·java·mybatis
哦虎!11 小时前
【JavaEE】网络初识
java
for_ever_love__11 小时前
MySQL ORDER BY 排序优化:从 Using filesort 到索引有序扫描(含双路 / 单路排序原理)
java·mysql·优化·存储·by·order·filesort