I have a pom.xml file with the following:
<sourceDirectory>${basedir}/src/main/test</sourceDirectory>
<outputDirectory>${basedir}/src/main/bin </outputDirectory>
Inside ${basedir}/src/main/test I have some folders which do not contain any .java files. When I start a compilation they are not copied to ${basedir}/src/main/bin directory.
Only .java files are moved (after compilation of course) and stored on the right folder.
Can someone help me to solve this problem without using any plugin ?
I tried with
<resources>
<resource>
<filtering>false</filtering>
<directory>${basedir}/src/main/test/scenarios</directory>
<includes>
<include>*.xml</include>
</includes>
<targetPath>${basedir}/src/main/bin/scenarios</targetPath>
</resource>
<resource>
<filtering>false</filtering>
<directory>${basedir}/src/main/test/sut</directory>
<includes>
<include>*.xml</include>
</includes>
<targetPath>${basedir}/src/main/bin/sut</targetPath>
</resource>
</resources>
But it does not work. What is wrong?
If they are not java files you should move them to the
src/main/resourcesand/orsrc/test/resourcesdirectory. That’s the maven convention for storing the non java files.Your other option is to use the maven-resources-plugin.
You have another option is to use the maven-antrun-plugin and execute an ant task to copy the files manually.