当前位置: 技术问答>java相关
使用ant出现的问题,给分
来源: 互联网 发布时间:2015-08-23
本文导语: 这是ant 的例子: thirdparty/libs/jdbc1.jar thirdparty/libs/jdbc2.jar build/main/com/myco/myapp/Servlet.class src/metadata/myapp.xml src/html/myapp/index.html src/jsp/myapp/front.jsp src/graphics/images/gifs/small/logo.gif src/graphics/images/gifs/large/logo.gif then the war f...
这是ant 的例子:
thirdparty/libs/jdbc1.jar
thirdparty/libs/jdbc2.jar
build/main/com/myco/myapp/Servlet.class
src/metadata/myapp.xml
src/html/myapp/index.html
src/jsp/myapp/front.jsp
src/graphics/images/gifs/small/logo.gif
src/graphics/images/gifs/large/logo.gif
then the war file myapp.war created with
will consist of
WEB-INF/web.xml
WEB-INF/lib/jdbc2.jar
WEB-INF/classes/com/myco/myapp/Servlet.class
META-INF/MANIFEST.MF
index.html
front.jsp
images/small/logo.gif
images/large/logo.gif
错误提示:
file:d:/antexample/cmp-cmr/section2/final/build.xml:1: Config file is not of expected XML type
还有ear怎样设置,有没有完整的例子,多谢.
thirdparty/libs/jdbc1.jar
thirdparty/libs/jdbc2.jar
build/main/com/myco/myapp/Servlet.class
src/metadata/myapp.xml
src/html/myapp/index.html
src/jsp/myapp/front.jsp
src/graphics/images/gifs/small/logo.gif
src/graphics/images/gifs/large/logo.gif
then the war file myapp.war created with
will consist of
WEB-INF/web.xml
WEB-INF/lib/jdbc2.jar
WEB-INF/classes/com/myco/myapp/Servlet.class
META-INF/MANIFEST.MF
index.html
front.jsp
images/small/logo.gif
images/large/logo.gif
错误提示:
file:d:/antexample/cmp-cmr/section2/final/build.xml:1: Config file is not of expected XML type
还有ear怎样设置,有没有完整的例子,多谢.
|
一般是这样的,其中default="makewar"表示默认会执行makewar这个project:
|
不知你的build.xml是怎么写的,请参考Joeblackyang(野Heart) 的解答。
同时你这个build.xml所在目录必须包含如下子目录及文件。
thirdparty/libs/jdbc1.jar
thirdparty/libs/jdbc2.jar
build/main/com/myco/myapp/Servlet.class
src/metadata/myapp.xml
src/html/myapp/index.html
src/jsp/myapp/front.jsp
src/graphics/images/gifs/small/logo.gif
src/graphics/images/gifs/large/logo.gif
同时你这个build.xml所在目录必须包含如下子目录及文件。
thirdparty/libs/jdbc1.jar
thirdparty/libs/jdbc2.jar
build/main/com/myco/myapp/Servlet.class
src/metadata/myapp.xml
src/html/myapp/index.html
src/jsp/myapp/front.jsp
src/graphics/images/gifs/small/logo.gif
src/graphics/images/gifs/large/logo.gif