On Thu, 24 Jul 2003 07:19 pm, peter reilly wrote:
> What are the issues with import.
>
> I think we should write them down and deal with
> them - it cannot be that difficult..
> The difficult ones (manipulation of basebir etc)
> we should explicitly defer to ant > 1.6.

Not difficult but the issues are there.

The renaming of overridden targets depends on project names but lots of 
projects don't have names. I believe the name can be provided in the import 
task to access overridden targets in unnamed projects and also to handle name 
collisions. Probably would require creation of the parsing context in the 
import task.

The basedir issue :-). I'd rather get it right in 1.6 than create a backward 
compatibility issue down the track. Got enough of those to deal with already. 
Import file resolution must be done relative to the basedir of the project 
doing the import, regardless of whether that is the outermost project.

For example,

<project basedir="..">
  <import file="base2/build.xml"/>

  <echo message="base1/build.xml"/>
</project>

This will not work:

Cannot find base2/build.xml imported from base1/build.xml

I've attached a small zip (will it make it through email?). I believe all 3 
builds should work as you would expect. Currently only the one without 
imports does.

Telling people only to use absolute imports is not acceptable, IMHO.

> import is a real cool feature.

Sure enough and also important enough to get right.

Conor

<<attachment: import.zip>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to