ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Surry <>
Subject Command-line property overrides with 'location' semantics?
Date Wed, 14 Jan 2004 21:54:24 GMT
It seems like specifying a property at the command-line via -D always uses 
'value' semantics, even if the property is declared in the project with 
'location' semantics.  For example, on a windows machine with this project:

<?xml version="1.0"?>
<project name="parameters" default="all" basedir=".">
   <property name="foo" value="c:/some/filename.txt"/>
   <property name="bar" location="c:/some/othername.txt"/>
   <target name="all">
     <echo message="foo = [${foo}] and bar = [${bar}]"/>

So plain 'ant' gives:

     [echo] foo = [c:/some/filename.txt] and bar = [C:\some\othername.txt]

but 'ant -Dbar=/a/b/c' gives:

     [echo] foo = [c:/some/filename.txt] and bar = [/a/b/c]

i.e. it's not converting bar as a location anymore.

Is there any way around this other than re-converting the property in the plan 
(ie. <property name="bar2" location="${bar}"/> ) ?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message