开发者

ant war - putting file parallel to web.xml

开发者 https://www.devze.com 2023-02-16 23:55 出处:网络
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 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>
0

精彩评论

暂无评论...
验证码 换一张
取 消