Maven Resource Plugin Copying Files

maven

Solution

Your problem is that you copy the resources in the phase `install`. In that phase your target archive is already built and copied to your local repository. See the Maven lifecycle. You'll propably want to do it in the `process-resources` phase.

Problem

I currently have some Maven projects which when I install the project I need to copy all files from the conf folder to the target folder. ``` |-Project |--src |--conf <--FROM HERE --> |--lib |--target <--TO HERE--> ``` I have attempted this in the pom.xml to no avail. What am I doing wrong? My plugin part of the pom.xml is below: ``` <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>2.6</version> <executions> <execution> <id>copy-resources</id> <phase>install</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${basedir}/target</outputDirectory> <resources> <resource> <directory>${basedir}/conf</directory> <includes> <include>*</include> </includes> </resource> </resources> </configuration> </execution> </executions> ```

Original source