Source Code : Redefine property in the children target
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
Redefine property in the children target
/*
Buildfile: build.xml
print-global:
[echo] In print-global
[echo] The value of property.example is: Local File
print-target:
[echo] In print-target
[echo] The value of property.example is: Local File
BUILD SUCCESSFUL
Total time: 0 seconds
C:Java_DevWEBdevjavaapiProantch03>
*/
<?xml version="1.0"?>
<project name="Apache Ant Properties Project" default="print-target" 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">
<property name="property.example" value="Target"/>
<echo message="In print-target"/>
<echo message="The value of property.example is: ${property.example}"/>
</target>
</project>
--------------------------------------------------------------------------------------
File: build.properties
property.example=Local File
property.file.example=build.properties
--------------------------------------------------------------------------------------
File: build.properties.default
property.example=Default File
property.file.example=build.properties.default
Thank with us