Well, you can use the target resources : copy-resources of the maven-resources plugin. I just leave the standard resource for inline (in jar) resources. And for an external resource, I create another folder: src/main/external-resources . Here I put my .properties file.
The next part will copy external resources for dir output at the verification stage. You can change the phase to suit your needs.
<plugin> <artifactId>maven-resources-plugin</artifactId> <version>2.6</version> <executions> <execution> <id>copy-resources</id> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${project.build.directory}</outputDirectory> <resources> <resource> <directory>src/main/external-resources</directory> </resource> </resources> </configuration> </execution> </executions> </plugin>
source share