|
Ant example source code file (property.xml)
The property.xml source code
<?xml version="1.0"?>
<project name="property-test" basedir="." default="test1">
<target name="test1">
<property environment="testenv"/>
</target>
<target name="test2">
<property name="testprop1" value="aa"/>
<property file="property1.properties"/>
<echo message="testprop1=${testprop1}, testprop3=${testprop3}, testprop4=${testprop4}"/>
</target>
<target name="test3">
<property file="property2.properties"/>
</target>
<target name="test4">
<property name="http.port" value="999" />
<property file="property3.properties"/>
<echo message="http.url is ${http.url}"/>
</target>
<target name="test5">
<property name="http.port" value="999" />
<property url="${test5.url}"/>
<echo message="http.url is ${http.url}"/>
</target>
<target name="prefix.success">
<property file="property3.properties" prefix="server1"/>
</target>
<target name="prefix.fail">
<property name="someprop" value="value" prefix="prefix"/>
</target>
<!-- caused an endless loop, PR 21825 -->
<target name="testCircularReference">
<property file="property4.properties"/>
</target>
<target name="thisIsNotACircularReference">
<property file="property5.properties"/>
<echo>b is ${b}
</target>
</project>
Other Ant examples (source code examples)Here is a short list of links related to this Ant property.xml source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.