ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Holzwarth <chuck_holzwa...@yahoo.com>
Subject Re: inline property expansion not working as advertised
Date Fri, 11 Jan 2008 14:59:41 GMT
You have to import the property file or declare the properties in the build file.
 
Thank you,
Chuck Holzwarth
(804) 403-3478 (home)
(540) 335-3171 (cell)

----- Original Message ----
From: Michael Pelz Sherman <mpelzsherman@yahoo.com>
To: Ant Users List <user@ant.apache.org>
Sent: Thursday, January 10, 2008 5:52:27 PM
Subject: inline property expansion not working as advertised


>From the Property task docs
 (http://ant.apache.org/manual/CoreTasks/property.html) 

================================
In-file property expansion is very cool. Learn to use it. 
 Example: 

build.compiler=jikes
deploy.server=lucky
deploy.port=8080
deploy.url=http://${deploy.server}:${deploy.port}/
================================

So I created a properties file with the above 
and the following build.xml file:

==================================
<?xml version="1.0"?>
<project name="inline props test" default="test">
        <target name="test">
            <echo>deploy.url is ${deploy.url}</echo>
        </target>
</project>
==================================

The I ran it as follows:

$ ant -propertyfile test.properties

Here is the output:

==================================
Buildfile: build.xml

test:
     [echo] deploy.url is http://${deploy.server}:${deploy.port}/

BUILD SUCCESSFUL
Total time: 0 seconds
================================== 
I'm using ant 7.0.

What am I doing wrong?

Thanks,
- mps









      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message