Решение, аналогичное @ mort's one с maven-antrun-plugin 1.8 :
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>copy</id>
<phase>compile</phase>
<configuration>
<target>
<copy file="sourceFile" tofile="targetFile"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
Обратите внимание, что узел <tasks>
не рекомендуется в пользу<target>
узел с maven-antrun-plugin 1.5 .