ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <>
Subject Re: ant 1.5.4 : Import
Date Fri, 25 Jul 2003 15:15:51 GMT

Conor MacNeill wrote, On 25/07/2003 17.19:
> On Sat, 26 Jul 2003 12:52 am, Stefan Bodewig wrote:
>>On Sat, 26 Jul 2003, Conor MacNeill <>
>>>Clear as mud?
>>Errm, yes.
>>How would you do
>><taskdef resource="...">
>>  <classpath>
>>    <fileset dir="lib/" includes="*.jar"/>
>>  </classpath>
>>By not using relative paths (but something like ${this.basedir}/lib),
>>I guess.
> Good question. Currently you get a property telling you the location of your 
> build file - not your basedir.

Correct, bacause the basedir has no meaning as the file is imported.
What about ant.projectdir and ant.projectdir.projectname properties?

> BTW, the property is based on the project's name which might be an issue if 
> the name is controllable by the importing build file. Is a name mandatory for 
> an importable project or just one that want to know its location?

IMHO the latter.

Explaining a bit more my cases:

  1) I have a project that is made only to be imported:
     <fragment name="">...</fragment>

     - Ant will deny the use of it standalone -

     I would need this when I use the ant.file.currentproject
     property that is not available when I run it standalone.
     (although we could as well put it, and so this use-case
     looses meaning it seems)

  2) I have a project that is not made to be imported:
     <project importable="false">...</project>

     - Ant will deny the use of it as imported -

     This project does not check that the resources and paths
     are resolved using the ant.file.projectname property, and
     thus would not work properly if imported.
     In this case the name attribute is mandatory.

  3) I have a project that can be imported or used as-is:
     <project importable="true">...</project>

     - Ant will never deny it's use -

     This project does not use external resources, or
     checks for them in a manner that works in both scenarios.

  4) I have a project that does not say if it can be imported:
     <project importable="true">...</project>

     - Ant will never deny it's use but warn if it's imported -

     The author does not tell you how it's meant to use.
     Most probably it's not made to be imported, so if you want
     to import it, good luck!

Nicola Ken Barozzi         
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)

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

View raw message