HoneyMoose
  • 首页
  • Java
  • Jersey
  • Jira
  • Confluence
  • U.S.
    • USRealEstate
    • USVisaTrack
    • H1B
  • 项目和网站
    • CWIKI.US
    • OSSEZ 社区
    • WIKI.OSSEZ.COM
    • BUG.OSSEZ.COM
    • RSS.OSSEZ.COM
BLOG.OSSEZ.COM
A responsive blog theme focused om user reading experience
  1. Home
  2. Computer Science
  3. This article

Maven 编译拷贝资源的时候提示 UTF-8 编码信息

2020年10月08日 2544Browse 11Like 0Comments

如下面的提示内容。

提示的是在拷贝资源文件的时候,因为没有指定编码,将会使用 UTF-8 对编码进行转换。

[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 2 resources
[INFO] Copying 2 resources
[INFO] The encoding used to copy filtered properties files have not been set. This means that the same encoding will be used to copy filtered properties files as when copying other filtered resources. This might not be what you want! Run your build with --debug to see which files might be affected. Read more at https://maven.apache.org/plugins/maven-resources-plugin/examples/filtering-properties-files.html

 

maven-encode

 

解决办法

在你的 pom 配置文件中 maven-resources-plugin 插件配置中,添加一个

<propertiesEncoding>UTF-8</propertiesEncoding>

这个参数。如果你的 pom 配置文件没有配置过 maven-resources-plugin 插件的话,你需要将这个插件先添加进去。

具体的配置参数如下:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <propertiesEncoding>UTF-8</propertiesEncoding>
                </configuration>
            </plugin>

 

maven-encode-01

 

上图显示了需要的配置状态。

 

https://www.ossez.com/t/maven-utf-8/560

Tags: None
Last updated:2020年10月08日

Kratos

stay absorbed stay excellent

Like
< Previous
Next >

Comments

Cancel reply

Newest Hotspots Random
Newest Hotspots Random
IntelliJ IDEA 2023.1 版本添加了包中类的列表功能 Jenkins 修改启动的端口 Spring 项目运行提示错误 Not a managed type Linux 查看 SELinux 的状态 WordPress 网站 Error Establishing a Database Connection(建立数据库连接时出错) Linux 开启或关闭 SELinux
Confluence 6 导入 SSL 证书和问题解决 Spring 数据初始 H2 后进行数据查询提示 Schema not found 错误 Confluence 6 为 Active Directory 配置一个 SSL 连接预要求 Discourse 数据分发 Confluence 6 从外部目录中同步数据如何工作 为什么这几年大家觉得春晚不好看了
Categories
  • Algorithm(算法)
  • AMQP
  • Angular
  • CI
  • Compile And CI
  • Computer Science
  • Confluence
  • DataBase
  • Gradle
  • H1B
  • Hibernate
  • IDE
  • Java
  • Jersey
  • Jira
  • MariaDB
  • PrestaShop
  • Spring
  • Spring Batch
  • U.S.
  • USRealEstate
  • USVisaTrack
  • 我的小厨

COPYRIGHT © 2020 HoneyMoose. ALL RIGHTS RESERVED.

THEME CWIKIUS.CN MADE BY VTROIS