如何避免使用maven-resources-plugin对二进制文件进行UTF-8编码? [英] how to avoid UTF-8 encoding for binary with maven-resources-plugin?

查看:81
本文介绍了如何避免使用maven-resources-plugin对二进制文件进行UTF-8编码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用maven-resources-plugin从项目中复制一些资源,但是我的资源之一是二进制文件.输出显示是Using 'UTF-8' encoding to copy filtered resources,这是我的问题!

I'm using the maven-resources-plugin to copy some resources from my project but one of my resources is a binary file. The output says it is Using 'UTF-8' encoding to copy filtered resources which I my problem!!!

这是我的插件配置.

        <plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.5</version>
            <executions>
                <execution>
                    <id>copy-resources</id>
                    <!-- here the phase you need -->
                    <phase>validate</phase>
                    <goals>
                        <goal>copy-resources</goal>
                    </goals>
                    <configuration>
                        <outputDirectory>${project.build.directory}/autopublisher</outputDirectory>
                        <resources>
                            <resource>
                                <directory>src/autopublisher</directory>
                                <filtering>true</filtering>
                            </resource>
                        </resources>
                    </configuration>
                </execution>
            </executions>
        </plugin>

我可以跳过二进制的UTF-8转换吗?

Can I skip the UTF-8 conversion for binaries?

谢谢.

推荐答案

很好地解决了我的问题,我将此添加到了配置中

Well to solve my problem I added this to my configuration maven binary filtering:

<nonFilteredFileExtensions>                            
    <nonFilteredFileExtension>dcm</nonFilteredFileExtension>
</nonFilteredFileExtensions>

这篇关于如何避免使用maven-resources-plugin对二进制文件进行UTF-8编码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆