Ant在eclipse中的build.xml的配置

Ant在eclipse中的build.xml的配置
<?xml version="1.0" ?>
- <project name="webmodulebuilder" default="deploy" basedir=".">
- <!--
set global properties for this build
-->
- <!--
发布WEB路径
-->
<property name="DEPLOY_PATH" value="C:\Tomcat 5.5\webapps\jieshengda" />
- <!--
源WEB路径
-->
<property name="WEB_PATH" value="D:\EclipseWork\jiedasheng\WebRoot" />
- <!--
源编译的jar包路径
-->
<property name="JAR_PATH" value="D:\EclipseWork\jiedasheng\WebRoot\WEB-INF\lib" />
- <!--
源java文件路径
-->
<property name="SCR_PATH" value="D:\EclipseWork\jiedasheng\src" />
- <!--
源class文件路径
-->
<property name="CLASS_PATH" value="D:\EclipseWork\jiedasheng\WebRoot\WEB-INF\classes" />
- <!--
定义classpath
-->
- <path id="LIB_CLASS_PATH">
<fileset file="${JAR_PATH}/*.jar" />
<pathelement path="${CLASS_PATH}" />
</path>
- <!--
初试化
-->
- <target name="init">
<mkdir dir="${DEPLOY_PATH}" />
<mkdir dir="${DEPLOY_PATH}/WEB-INF" />
<mkdir dir="${DEPLOY_PATH}/WEB-INF/classes" />
<mkdir dir="${DEPLOY_PATH}/WEB-INF/lib" />
</target>
- <!--
编译类
-->
- <target name="compile" depends="init" description="compile the source files">
<mkdir dir="${CLASS_PATH}" />
- <javac srcdir="${SCR_PATH}" destdir="${CLASS_PATH}">
<classpath refid="LIB_CLASS_PATH" />
</javac>
</target>
- <!--
Copy发布
-->
- <target name="deploy" depends="init,compile">
- <copy todir="${DEPLOY_PATH}">
- <fileset dir="${WEB_PATH}">
<include name="**/*.*" />
<exclude name="**/jsp_servlet/*.class" />
<exclude name="**/build.xml" />
<exclude name="**/deploy.xml" />
<exclude name="**/build.properties" />
<exclude name="**/servers.xml" />
<exclude name="**/targets.xml" />
<exclude name="**/*.war" />
</fileset>
</copy>
</target>
</project>

posted on 2008-01-08 18:46 灵! 阅读(2229) 评论(0)  编辑  收藏 所属分类: Java专题-部署打包


只有注册用户登录后才能发表评论。


网站导航:
 
<2008年1月>
303112345
6789101112
13141516171819
20212223242526
272829303112
3456789

导航

统计

随笔分类

随笔档案

最新评论

阅读排行榜

评论排行榜