I'm trying to copy a single file from the directory that my project is in and move it to a somewhat temporary "dist" directory until it can be copied to its final location. The pom seems to know where the project is located but it doesn't like the fact that I don't specify a directory and when I do specify the directory, it says it cannot be located.
Here's what works as far as copying goes:
<id>copy-resources-rdeska</id>
<phase>site</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<overwrite>true</overwrite>
<outputDirectory>${dist.dir}/rdesk</outputDirectory>
<resources>
<resource>
<directory>/rdesk</directory>
<filtering>false</filtering>
<includes>
<include>**/*</include>
</includes>
<excludes>
<exclude>**/*.svn</exclude>
<exclude>**/webapp/*</exclude>
<exclude>/contact_ejb_default/</exclude>
</excludes>
</resource>
</resources>
</configuration>
This is one of many, but the troublesome one looks like this:
<id>copy-resources-deploy</id>
<phase>site</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<overwrite>true</overwrite>
<outputDirectory>${dist.dir}/deploy</outputDirectory>
<resources>
<resource>
<directory></directory>
<filtering>false</filtering>
<includes>
<include>deploy.xml</include>
</includes>
</resource>
</resources>
</configuration>
The biggest difference is that I am trying to copy a single file, but either way it is not finding the current directory.
I don't think you can leave the <directory>
element empty in a resource element. If the deploy.xml file is in the project directory, try
<directory>${basedir}</directory>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With