Your preferences have been saved!
» Define and reference property - <?xml version="1.0" encoding="UTF-8"?> <project basedir="." default="build" name="Agnotion">     <property name="JUNIT_HOME" value="eclipse/plugins/org.junit_3.8.1"/>     <path id="project.classpath">         <pathelement location="build/java"/>         <pathelement location="build/test"/>         <pathelement location="${JUNIT_HOME}/junit.jar"/>     </path>     <target name="init">         <mkdir dir="build/test"/>... 16 Feb 12 » In init target set the properties - <project name="YourName" default="all">   <target name="all" depends="init,clean,compile,createJars,copyBuild" >   </target>   <target name="init" description="Project">     <property environment="env" />     <property name="j2sdkApi" value="${env.JAVA_HOME}/jre/lib/rt.jar" />       <property name="src" value="./src" />     <property name="build" value= "./build" />   </target>   <target name="clean" description="build" depends="init">... 16 Feb 12 » Reference ant.project.name - <?xml version="1.0" encoding="UTF-8"?> <project basedir="." default="build" name="Agnotion">     <property name="JUNIT_HOME" value="eclipse/plugins/org.junit_3.8.1"/>     <path id="project.classpath">         <pathelement location="build/java"/>         <pathelement location="build/test"/>         <pathelement location="${JUNIT_HOME}/junit.jar"/>     </path>     <target name="init">         <mkdir dir="build/test"/>... 16 Feb 12 » Separate two values - <?xml version="1.0"?> <project name="Apache Ant Properties Project" default="properties.custom" basedir=".">   <target name="properties.custom">     <!-- Windows users should leave this line uncommented -->     <property name="build.path"                value="${basedir}/build.xml:${basedir}/build.properties"/>     <!-- Unix users should remove the above line           and uncomment the below line -->     <!--     <property name="build.path" ... 16 Feb 12 » Ant buildin properties - <?xml version="1.0"?> <project name="Apache Ant Properties Project" default="properties.built-in" basedir=".">   <target name="properties.built-in">     <echo message="The base directory: ${basedir}"/>           <echo message="This file: ${ant.file}"/>     <echo message="Ant version: ${ant.version}"/>      <echo message="Project name: ${ant.project.name}"/>          <echo message="Java version: ${ant.java.version}"/>        </target> </project>... 16 Feb 12 » Define custom property based on existing properties - <?xml version="1.0"?> <project name="Apache Ant Properties Project" default="properties.custom" basedir=".">   <target name="properties.custom">     <property name="fs" value="${file.separator}"/>     <property name="ps" value="${path.separator}"/>     <echo message="File: ${basedir}${fs}build.xml"/>     <echo message="Path: ${basedir}${fs}build.xml${ps}${basedir}${fs}build.properties"/>   </target> </project>... 16 Feb 12 » Custom properties - <?xml version="1.0"?> <project name="Apache Ant Properties Project" default="properties.custom" basedir=".">   <target name="properties.custom">     <property name="build.no" value="1.1"/>     <echo message="Build no. = ${build.no}"/>   </target> </project>... 16 Feb 12 » Referrence property: basedir - <?xml version="1.0"?> <project name="Apache Ant Properties Project" default="build.path" basedir=".">   <target name="build.path">     <echo message="File: ${basedir}${file.separator}build.xml"/>     <echo message="Path: ${basedir}${file.separator}build.xml${path.separator}${basedir}${file.separator}build.properties"/>   </target> </project>... 16 Feb 12 » Load file through URL - <?xml version="1.0"?> <project name="Apache Ant Properties Project" default="properties.url" basedir=".">   <target name="properties.url">     <property url="http://localhost:8080/antBook/properties/build.properties"/>     <path id="build.classpath.id">       <pathelement path="${build.classpath}"/>     </path>     <property name="build.classpath.property" refid="build.classpath.id"/>     <echo message="Server URL: ${server.url}"/>     <echo message="Build classpath: ${build.classpath}"/>... 16 Feb 12 » Redefine property in the children target 2 - <?xml version="1.0"?> <project name="Apache Ant Properties Project" default="print-file" basedir=".">   <property file="build.properties"/>   <property file="build.properties.default"/>   <property name="property.example" value="Global"/>   <target name="print-global">     <echo message="In print-global"/>     <echo message="The value of property.example is: ${property.example}"/>   </target>   <target name="print-target" depends="print-global">... 16 Feb 12