The File collector plugin is used to copy selected resources (files and/or directories) from partly known directory paths. Search expressions are written Ant-style.
Here is the configuration for the task described above:
<plugin> <groupId>ch.elca.el4j.maven.plugins</groupId> <artifactId>maven-file-collector-plugin</artifactId> <configuration> <rootSourceDirectory>modules</rootSourceDirectory> <sourceDirectoryIncludePatterns>**/src/main/java,**/src/test/java</sourceDirectoryIncludePatterns> <sourceFileIncludePatterns>**/*.java,**/package.html</sourceFileIncludePatterns> <targetDirectory>target/aggregated-files</targetDirectory> <allowOverwrite>false</allowOverwrite> </configuration> </plugin>
For detailed usage see the plugin info page.