ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32006] - new optional 'basedir' attribute for property task
Date Tue, 02 Nov 2004 22:34:36 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32006>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32006

new optional 'basedir' attribute for property task

stevel@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX



------- Additional Comments From stevel@apache.org  2004-11-02 22:34 -------
Ian,

I am going to have to be ruthless and mark as wontfix.

1. you get exactly the semantics you want with

<property name="base.dir" location="C:/projects/otherProject" />
<property name="myPath" location="${base.dir}xml/foo.xml"  />

 (though you should *not* be hard coding paths into portable files)

2. changing the type of a setter for one of the core ant tasks is absolutely
forbidden. That is the programmatic API to ant, and one that gets used a lot,
especially by extension tasks. There may be no uses of that method in the ant
codebase, but we don't know what other things use it, and have to assume the
worst. You can overload an existing option, but then you have to deal with the
existing one may still be called. 

3. we have enough functionality stuck in that task already. What would the
semantics be of setting basedir for any other operation? An error? Then we'd
need the error checking code -and the tests that it worked. 

4. If you do not find point #1 adequate, then the solution would be some
explicit task to set a property to a bound dir:

<setlocation property="foo" base="c://something" subdir="subdir" 
 basemustexist="true" subdirMustExist="true"/>

There may be some merit in that, as you can add more tests (base must exist,
must be a dir, perhaps), and it may be more readable.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message