I have an Eclipse webapp project that I am trying to migrate from Ant build to Maven build. I have a lot of non-Java files in my src/
folder, for example log4j2.xml
, ehcache.xml
, some .properties
localization files etc.
When I run war:war
target on this project, the resulting WAR file contains only the .class
files in the WEB-INF/classes
folder, all the non-Java files are missing. In Ant I did this:
<target name="copy-resources" depends="compile">
<copy todir="${build}">
<fileset dir="${src}">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
How do I achieve the same thing in Maven? I suspect I should be using the resources
folder, but right now I am trying to migrate with as little changes to the original codebase as possible...