This goal requires that you configure the resources to be copied, and specify the outputDirectory.
Copy two (or more) external resource directories within the basedir
to the build output directory using maven (see blah
and uggh
).
${basedir}/
- pom.xml
- blah/
- uggh/
- src/
- main/..
- test/..
- target/
- classes/..
- blah/
- uggh/
For example, given the directory structure above copy blah
and uggh
to the target directory using maven. It is easy to copy one or the other, however, the plugin only accepts a single outputDirectory. If you specify the target
directory and both directories as resources, then the contents of each directory gets copied to target
but not the directories themselves.
Additional use of the plugin overwrites the initial. Also, I've tried specifying the entire basedir
and only including the desired directories. This does not copy anything.
Here is an example of copying a single directory:
<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>${basedir}/target/blah</outputDirectory>
<resources>
<resource>
<directory>blah</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>