study

djk1990 2011-12-19 09:39:21
build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="itsystem" basedir="." default="all">
<!-- Set system environment variables -->
<property name="tomcat.home" value="C:\apache-tomcat-6.0.18\apache-tomcat-6.0.18" />

<!-- Local system path settings -->
<property name="servlet-api.jar" value="${tomcat.home}/lib/servlet-api.jar" />
<property name="jsp-api.jar" value="${tomcat.home}/lib/servlet-api.jar" />
<property name="distpath.project" value="${tomcat.home}/webapps" />

<!-- Project set -->
<property name="project.distname" value="itsystem" />

<!-- Setting the path -->
<property name="dir.src" value="src" />
<property name="dir.webinf" value="WebContent/WEB-INF" />
<property name="dir.classes" value="${dir.webinf}/classes" />

<!-- Compile the class path set -->
<path id="compile.classpath">
<pathelement path="${dir.classes}" />
<pathelement path="${classpath}" />
<pathelement path="${servlet-api.jar}" />
<pathelement path="${jsp-api.jar}" />
<fileset dir="${dir.webinf}/lib">
<include name="*.jar" />
</fileset>
</path>

<!-- prepare for pre-defined -->
<target name="prepare">
<tstamp />
</target>

<!-- resources used to implement the deployment and configuration files -->
<target name="resources">
<copy todir="${dir.classes}" includeEmptyDirs="no">
<fileset dir="${dir.src}">
<patternset>
<include name="**/*.conf" />
<include name="**/*.properties" />
<include name="**/*.xml" />
<include name="**/mess_zh_CN.properties" />
<include name="**/mess_en_US.properties" />
</patternset>
</fileset>
</copy>
<native2ascii src="${dir.src}" dest="${dir.classes}" includes="**/*_zh_CN.properties" encoding="utf-8" />

</target>
...全文
38 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
djk1990 2011-12-19
  • 打赏
  • 举报
回复
<!-- compile all Java files -->
<target name="compile" depends="prepare,resources">
<javac srcdir="${dir.src}" destdir="${dir.classes}">
<classpath refid="compile.classpath" />
</javac>
</target>

<!-- clean mainly used to clear the target file has been compiled and deployed file -->
<target name="clean" description="Prepare for clean build">
<delete dir="${dir.classes}" />
<delete dir="${distpath.project}/${project.distname}" />
<delete dir="${distpath.project}/${project.distname}.war" />
<mkdir dir="${dir.classes}" />
</target>

<!-- project recompile all the JAVA file -->
<target name="project" depends="clean,prepare,compile" />

<!-- dist used to complete the deployment of the project -->
<target name="dist" description="Create binary distribution">
<war basedir="WebContent" warfile="${distpath.project}/${project.distname}.war" webxml="${dir.webinf}/web.xml">
<exclude name="${distpath.project}/${project.distname}.war" />
</war>
</target>

<!-- all used to re-compile and deploy the entire application -->
<target name="all" depends="project,dist" />
</project>

23,407

社区成员

发帖
与我相关
我的任务
社区描述
Java 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧