Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to avoid UTF-8 encoding for binary with maven-resources-plugin?

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!!!

Here is my plugin configuration.

        <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>

Can I skip the UTF-8 conversion for binaries?

Thank you.

like image 784
code-gijoe Avatar asked Apr 27 '11 15:04

code-gijoe


1 Answers

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

<nonFilteredFileExtensions>                            
    <nonFilteredFileExtension>dcm</nonFilteredFileExtension>
</nonFilteredFileExtensions>
like image 104
code-gijoe Avatar answered Sep 23 '22 12:09

code-gijoe