I have a java artifact dual-built for both linux & IBM mainframe, all the dependent shell scripts (in /sbin dir) are initially written in ASCII but are copied to another directory (in /sbin-ebcdic). So I configure the maven-resources-plugin to do it for me:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>copy-sbin</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/sbin-ebcdic</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}/sbin</directory>
</resource>
</resources>
<encoding>IBM037</encoding>
</configuration>
</execution>
</executions>
</plugin>
While it does copy the entire directory, all files in them are still in UTF-8 encoding, as if my:
<encoding>IBM037</encoding>
setting doesn't exist. Why the maven-resources-plugin doesn't function as intended? Is it a bug?