<!-- 指定环境变量参数为: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>