时间:2014.02.09 发布人:xoji277dbb
已解决问题
谷歌xoji277dbb用户在2014.02.09提交了关于“
达芬奇有谁用过ant部署一个j2ee项目”的提问,欢迎大家涌跃发表自己的观点。目前共有1个回答,最后更新于2024-11-22T23:22:57。用eclipse开发一个项目后,怎样用ant部署这个项目啊。就是说这个项目的结构是怎样的,需要哪些文件夹,才可以让它运行起来。希望大家能够帮助她。
详细问题描述及疑问:用eclipse开发一个项目后,怎样用ant部署这个项目啊。就是说这个项目的结构是怎样的,需要哪些文件夹,才可以让它运行起来。期待您的答案,你是我的宝贝,你是我的花,谢谢你对我的帮助!
希望以下的回答,能够帮助你。
第1个回答
用户名:wuwenyanlo
build.xml下面代码运行一下这个问答代码就行了
<projectna课蛋倍跑队次误犯me="MyProject"default="dist"basedir=".">
<description>
simpleexamplebuildfile
</description>
<!--setglo许聚象孩菜米烟频扬若balpropertiesfo且参病副板rthisbuild-->
<propertyname="src"location="src"/>
<propertyname="build"location="build"/>
<propertyname="dist"location="dist"/>
<targetname="init">
<!--Createthetimestamp-->
<tstamp/>
<!--Createthebui脱段内实lddirecto粒rystructureusedbycompile-->
<mkdirdir="${build}"/>
</往油唱总频究办期坏永纸target>
<targetname="compile"depends="init"
description="compilethesource">
<!--Compilethej**acodefrom${src}into${build}-->
<j**acsrcdir="${src}"destdir="${build}"/>
</甚色田target>
<targetname="dist"depends="compile"
description息起效="generatethedistribution">
<!--Createthedistributiondirectory-->
<mkdirdir="${dist}/lib"/>
<!-号-Puteverythingin${buil白扩且通声概清率环d}intotheMyProject-${DSTAMP}.jarfile-->
<jarjarfile持保米口孙促预于右状="${dist}/lib/MyProject-${DSTAMP}.jar"basedir="${build}"/>
</ta名钱搞胡怕rget>
<targetname="clean"
descri切福慢练意ption="cleanup">
<!--Deletethe${build}and${dist}directorytrees-->
<deletedir="${build}"/>
<deletedir="${dist}"/>
</target>
</project>