ant 构建文件路径

<project name="Build1" basedir=".">   
	 <target name="echo"> 
	 	<echo message="---------------------------------------"/>
		<echo message="ant.file = ${ant.file}"/>
		<echo message="ant.home = ${ant.home}"/>
		<echo message="ant.java.version = ${ant.java.version}"/>
		<echo message="ant.project.name = ${ant.project.name}"/>
		<echo message="ant.version = ${ant.version}"/>
		<echo message="basedir = ${basedir}"/>
		<echo message="---------------------------------------"/>
		<echo message="user.name = ${user.name}"/>
		<echo message="user.home = ${user.home}"/>
		<echo message="java.home = ${java.home}"/>
		<echo message="---------------------------------------"/>
	 </target>   
</project>  


输出文件:

Buildfile: D:\project\spring\Test.xml
echo:
     [echo] ---------------------------------------
     [echo] ant.file = D:\project\spring\Test.xml
     [echo] ant.home = C:\Genuitec\Common\plugins\org.apache.ant_1.8.2.v20110505-1300
     [echo] ant.java.version = 1.6
     [echo] ant.project.name = ${project}
     [echo] ant.version = Apache Ant(TM) version 1.8.2 compiled on December 20 2010
     [echo] basedir = D:\project\spring
     [echo] ---------------------------------------
     [echo] user.name = jinzongyu
     [echo] user.home = C:\Documents and Settings\jinzongyu
     [echo] java.home = C:\Genuitec\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\jre
     [echo] ---------------------------------------
BUILD SUCCESSFUL
Total time: 344 milliseconds


你可能感兴趣的:(apache,spring,ant,Build,plugins,2010)