I have the below task in my ant and it is copying all the files like jdbc.properties, applicationContext.xml outside WEB-INF folder. But what I need is the files to be placed under WEB-INF folder. How do I achieve this?
<war destfile="my.war" webxml="web/WEB-INF/web.xml">
<classes dir="build/web/WEB-INF/classes"/>
<fileset dir="web/WEB-INF"/>
<lib dir="web/WEB-INF/lib"/>
<zipfileset dir="web/images" prefix="images"/>
</war>
Instead of
<fileset>, use<sipfileset>it’s just like<fileset>except you can declare a prefix parameter:Or, since those files are already under a
WEB-INFdirectory, you can specify a<fileset>to thewebdirectory, and then specify only theWEB-INFdirectory underneath that: