ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Haas <thomas.h...@softwired-inc.com>
Subject Re: Path & dir separators (was Re: Ant Principles)
Date Fri, 21 Apr 2000 07:11:45 GMT


rubys@us.ibm.com wrote:

> My two cents: we can certainly continue to support the current syntax to
> handle the common cases.

Yes. Common case meaning, whatever you specify can be handled by java.io.File
on the current platform.


> In cases where more complex parameters are required (os specific options
> and the like), then we should consider separate elements that are parellel
> to tasks instead of embedded inside the task.  I reason that paths are
> often referenced in multiple places in a build.xml, so this can reduce the
> overall size.  In case this is not clear, an abbreviated example
> (attributes not relevant to the example are omitted):
>
> <project>
>   <target name="main">
>     <directory id="work" path="../build"/>
>     <javac destdirId="work"/>
>     <jar basedirId="work"/>
>   </target>
> </project>
>
> - Sam Ruby

Very nice.
Some random questions popping up:

Would I be able to move the specification of the directory into another task,
so it can be used across tasks?

Does the uncommon case look like the following?
<directory id="work">
    <location somenotation="...."/>
</directory>
... which is fine with me.


Can we also say
<path id="myclasspath">
    ... classpath definition as discussed previously
</path>
... which is also fine with me.


Cosmetic: I prefer the word "path" being reserved for list of files or
directories. I therefor prefer something like
<directory id="foo" location="../work"/>
Instead of location file could be used, to indicate that the contents is
processed by java.io.File, unless it confuses people, because it says directory
in the first place. Actually anything but "path" is fine with me.


- tom

--
* Thomas Haas             <mailto:thomas.haas@softwired-inc.com>
* SoftWired AG                   <http://www.softwired-inc.com/>
* Technoparkstr. 1  ***  CH-8005 Zurich  ***  +41-1-4452370



Mime
View raw message