复制代码代码如下:
<? Xml Version = "1.0" encoding = "UTF-8"?>
<name proyek = "hello world" default = "doc" bedandeir = ".">
<!-Properti->
<propertyname = "src.dir" value = "src"> </pruptent>
<propertyname = "Report.dir" value = "Report"> </prop Propert>
<propertyname = "class.dir" value = "class"> </pruptent>
<propertyname = "lib.dir" value = "lib"> </pruptent>
<propertyname = "dist.dir" value = "dist"> </propt>
<propertyname = "doc.dir" value = "doc"> </propt>
<propertyname = "jar.name" value = "hello.jar"> </prop Property>
<propertyname = "war.name" value = "hello.war"> </prop Property>
<propertyname = "WebContent" value = "WebContent"> </pruptent>
<propertyname = "war.dir" value = "war"> </prupter>
<!-定义 ClassPath->
<pathid = "master-classpath">
<filesetFile = "$ {lib.dir}/*. Jar"/>
<pathelementPath = "$ {class.dir}"> </pathelement>
</path>
<!-初始化任务->
<targetName = "init">
<deletedir = "$ {lib.dir}"> </delete>
<deletedir = "$ {dist.dir}"> </delete>
<deletedir = "$ {doc.dir}"> </delete>
<deletedir = "$ {war.dir}"> </delete>
<mkdirdir = "$ {src.dir}"> </mkdir>
<mkdirdir = "$ {Report.dir}"> </mkdir>
<mkdirdir = "$ {class.dir}"> </mkdir>
<mkdirdir = "$ {lib.dir}"> </mkdir>
<mkdirdir = "$ {dist.dir}"> </mkdir>
<mkdirdir = "$ {doc.dir}"> </mkdir>
<mkdirdir = "$ {war.dir}"> </mkdir>
<echomessage = "初始化完成!"> </cho>
</target>
<!-编译->
<targetName = "compile" tergantung = "init" description = "compileThesourceFiles">
<javacsrcdir = "$ {src.dir}" destdir = "$ {class.dir}" termasuk Antruntime = "on">
<classpathrefid = "master-classpath"> </smelaspath>
</javac>
</target>
<!-打包成 Jar->
<targetName = "pack" tergantung = "compile" description = "make.jarfile">
<jardestfile = "$ {dist.dir}/$ {jar.name}" berbasisripir = "$ {class.dir}">
</jar>
</target>
<!-打成 Perang->
<targetName = "war" tergantung = "pack">
<wardestfile = "$ {war.dir}/$ {war.name}" webxml = "$ {webcontent} /web-inf/web.xml">
<filesetDir = "$ {war.dir}"/>
<libdir = "$ {WebContent}/web-inf/lib"/>
<classdir = "$ {class.dir}"> </belas>
</war>
</target>
<!-输出 API 文档->
<targetName = "doc" tergantung = "war" description = "createapidoc">
<javadocdestdir = "$ {doc.dir}" penulis = "ture" versi = "ture" use = "ture" windowTitle = "helloWorldapi">
<packageSetDir = "$ {src.dir}" defaultExcludes = "yes">
<inclayename = "Contoh/**"/>
</packageSet>
<Coctitle> <! [CDATA [<H1> Halo, World </h1>]]> </doctitle>
<BOTTOM> <! [CDATA [<i> allrightsreserved </i>]]> </tot Bottom>
<tagname = "todo" scope = "all" description = "todo:"/>
</javadoc>
</target>
</jadi Project>