如何在Maven中配置编码?

本文翻译自:How to configure encoding in Maven?

When I run maven install on my multi module maven project I always get the following output: 当我在我的多模块maven项目上运行maven install ,我总是得到以下输出:

[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!

So, I googled around a bit, but all I can find is that I have to add: 所以,我google了一下,但我能找到的是我必须添加:

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

...to my pom.xml. ...到我的pom.xml。 But it's already there (in the parent pom.xml ). 但它已经存在(在父pom.xml )。

Configuring <encoding> for the maven-resources-plugin or the maven-compiler-plugin also doesn't fix it. 为maven-resources-plugin或maven-compiler-plugin配置<encoding>也无法修复它。

So what's the problem? 所以有什么问题?


#1楼

参考:https://stackoom.com/question/Cf2V/如何在Maven中配置编码


#2楼

This would be in addition to previous, if someone meets a problem with scandic letters that isn't solved with the solution above. 如果有人遇到上述解决方案无法解决的scandic字母问题,那么这将是以前的补充。

If the java source files contain scandic letters they n

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值