ant war - putting file parallel to web.xml
I am trying to use spring webservice with ant. spring webservice requires spring-ws-servlet.xml and sample.xsd file to be put in war file parallel to web.xml.
I am trying this wa开发者_StackOverflow中文版r command and it is putting parallele to web-inf folder instead inside of it. Please let me know what should i modify to put it inside web-inf folder.
<copy file="config/ws/spring-ws-servlet.xml" tofile="lps/WEB-INF/spring-ws-servlet.xml" />
<war warfile="dist/ODG.war" webxml="config/web.xml">
<lib dir="lps/WEB-INF/lib" />
<classes dir="lps/WEB-INF/classes" />
<fileset dir="lps/ws"/>
</war>
As the ant manual states, add a webinf
element to the war task to add files into the WEB-INF
directory.
<war warfile="dist/ODG.war" webxml="config/web.xml">
...
<webinf>
<fileset dir="config/ws" includes="spring-ws-servlet.xml"/>
</webinf>
</war>
精彩评论