Fork me on GitHub

Copies files from source to output directory

This example shows how use the copy goal to copy all files without ignored extension from src/files to ${project.build.directory}/${project.artifactId}-${project.version}/files directory.

<project>
   ...
   <build>
      <plugins>
         ...
         <plugin>
            <groupId>biz.gabrys.maven.plugins</groupId>
            <artifactId>directory-content-maven-plugin</artifactId>
            <version>1.2.1</version>
            <executions>
               <execution>
                  <goals>
                     <goal>copy</goal>
                  </goals>
                  <configuration>
                     <sourceDirectory>src/files</sourceDirectory>
                     <includes>
                        <include>**/*</include>
                     </includes>
                     <excludes>
                        <exclude>**/*.ignored</exclude>
                     </excludes>
                     <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}/files</outputDirectory>
                  </configuration>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>
<project>