My Ant file
来源:互联网 发布:电脑编程好找工作吗 编辑:程序博客网 时间:2024/05/16 09:39
<!-- Copyright (c) 2002 by ObjectLearn. All Rights Reserved. -->
<project name="OBSH" basedir="." default="deploy" >
<!--add path to javac-->
<path id="project.class.path">
<pathelement path="WEB-INF/lib/*.jar" />
<pathelement path="WEB-INF/classes/" />
<pathelement path="C://Sun//AppServer//lib//j2ee.jar" />//Put them in if you don't wanna to use the “Build“ in eclipse
<pathelement path="C://Program Files//jakarta-struts-1.1//jakarta-struts-1.1//lib//struts.jar" />
<pathelement path="${classpath}" />
<pathelement path="C://eclipse-SDK-3.0M6-win32//eclipse//workspace//OBSH//bin" />
</path>
<!--initProperties-->
<target name="initProperties" description="loading the build.properties">
<property file="build.properties"/>
</target>
<!--init-->
<target name="init" depends="initProperties" description="init the values">
<property name="deploy.dir" value="${deploy.dir}" />
<property name="dist.name" value="OBSH" />
</target>
<!-- Adds the time and minimize the time.-->
<target name="prepare" description="add the time stamp">
<tstamp/>
</target>
<!-- Copy the resources to the class -->
<target name="resources" description="copy the resources">
<copy todir="./classes/resources">
<fileset dir="./src/resources">
<include name="*.*" />
</fileset>
</copy>
</target>
<!-- Compile the src file -->
<target name="compile" depends="prepare,init" description="compiling the source file">
<javac srcdir="src" destdir="classes">
<classpath refid="project.class.path"/>
</javac>
</target>
<!-- clean work -->
<target name="clean" description="clean the /classes" depends="deploy">
<delete dir="classes"/>
<mkdir dir="classes"/>
</target>
<!-- create the war file-->
<target name="war" description="creat the war" depends="compile,resources">
<delete dir="./dist"/>
<mkdir dir="./dist"/>
<war warfile="./dist/${dist.name}.war"
webxml="../WEB-INF/web.xml"
manifest="../META-INF/MANIFEST.MF">
<fileset dir="../">
<exclude name="WEB-INF/src/**/*.*" />
<exclude name="WEB-INF/web.xml" />
</fileset>
</war>
</target>
<!-- create the jar file -->
<target name="jar" description="create an ear file" depends="war">
<jar jarfile="./dist/${dist.name}.jar" >
<fileset dir="${project.dir}/${bin.dir}">
<include name="**/*.*"/>
<exclude name="vincent/TestClient/**/*.*" />
</fileset>
<fileset dir="${project.dir}/BeanBoxes">
<include name="META-INF/**/*.*"/>
<exclude name="META-INF/beans.xml"/>
<exclude name="META-INF/build.xml"/>
<exclude name="META-INF/deploy.xml"/>
<exclude name="META-INF/undeploy.xml"/>
<exclude name="META-INF/build.properties"/>
<exclude name="META-INF/ejbs.xml"/>
<exclude name="META-INF/xdoclet.xml"/>
<exclude name="META-INF/servers.xml"/>
<exclude name="META-INF/targets.xml"/>
</fileset>
</jar>
</target>
<!--create the ear file-->
<target name="ear" description="create an ear file" depends="jar">
<delete dir="./ear" />
<mkdir dir="./ear" />
<ear destfile="./ear/${dist.name}.ear"
appxml="../META-INF/application.xml">
<fileset dir="./dist" includes="*.jar,*.war" />
</ear>
</target>
<!--deploy on the JBoss-->
<target name="deploy" description="deploy on the JBoss" depends="ear">
<copy todir="${deploy.dir}"
file="./ear/${dist.name}.ear"
/>
<delete dir="./dist" />
<delete dir="./ear" />
</target>
</project>
- My Ant file
- my deploy file
- My test file
- My vimrc file
- my .vim readme file
- ant build file demo
- my bash shell config file
- [Ant存档] My First Hand-writing Ant script
- Aother ant Project xml file
- Java Ant - SQLExec .SQL File
- ant pack up ear file
- My first javascript file on xml.
- Creating Hidden Folders, my batch file method
- What's my mail file size?
- Leave my XML file alone in Documentum
- WPF Image element locks my local file
- EXT2 file system file.c with my comments
- my[Java基础]使用Ant发布war包
- DAO RDO ADO ADO.NET
- Eclipse+JBoss+Struts制作网上书店解析(二)
- Some important actions
- Page Control
- 意外获得CSDN的Blog
- My Ant file
- asp.net 中的截取 Session 变量(翻译)
- 搬家(搬到http://oldwain.itpub.net/)
- web.xml
- IOSN 组织发布 Linux 台式机手册
- Some jsps
- .Net Tips: .Net Run-time Serialization
- 今天机器中了病毒:Trojan.PSW.Lmir.pj.enc
- 【转】elipse参考