<!-- 指定环境变量参数为:SystemVariable -->
<property environment="SystemVariable" />
<!-- 将tomcat.home指向环境变量TOMCAT_HOME指向的路径 -->
<property name="tomcat.home" value="${SystemVariable.TOMCAT_HOME}" />
<target name="display">
<echo message="${tomcat.home}" />
<mkdir dir="${tomcat.home}/test"/>
</target>
片段
<!--tomcathome-->
<property name="tomcathome" location="${SystemVariable.TOMCAT_HOME}"/>
<!--编译Plat用的classpath-->
<path id="classpath">
<fileset dir="${lib}">
<include name="*.jar"/>
</fileset>
<fileset dir="${tomcathome}/lib">
<include name="*.jar"/>
</fileset>
</path>
<javac srcdir="${basedir}/src;${basedir}/patch/spring" destdir="${classes}" includeantruntime="false" bootclasspath="${java.home}/lib/rt.jar" >
<classpath refid="classpath"/>
<compilerarg value="-g:lines,vars,source" />
</javac>
本文介绍了如何使用Ant构建工具来配置项目构建过程。具体包括设置环境变量、定义项目路径、编译源代码等关键步骤。通过示例展示了如何利用Ant的任务(task)来实现这些功能。
761

被折叠的 条评论
为什么被折叠?



