My bad, it seems as this is already being considered as part of ANT2 ...

"The only way to "include" common XML snippets so far has been the usage
of external SYSTEM entities, a mechanism that is tied to DTDs and
doesn't mix well with alternative approaches like XML Schema. Ant2 will
provide a built-in include mechanism."

Sorry to bother!
- Rodney

-----Original Message-----
From: Rodney Aiglstorfer [mailto:[EMAIL PROTECTED] 
Sent: Saturday, April 13, 2002 6:19 PM
To: ANT Dev List
Subject: ANT needs an 'import' task

Complex build systems can get quite large and I have not been successful
in finding an easy method of modularizing.  Existing tasks such as 'ant'
load and execute a target during runtime (i.e. after the parent
buildfile has been parsed by the ProjectHelper).  In most cases this is
not sufficient . consider the following examples

 

Example. build.xml

 

<project name="main">

    .

</project>

 

Example. build-mod.xml

 

<project name="sub">

    <target name="sub-target"/>

</project>

 

 

If ant is invoked on build.xml, there is no way (using the 'ant' task)
to specify a target in the second build file 'buildmod.xml'.

 

IMHO, what is needed is a top-level 'import' tasks that can be used as
such:

 

<project .>

    <import buildfile="another-build-file.xml"/>

    .

</project>

 

or alternatively, add an option to the Main class that would indicate a
list of build files to pre-parse/merge before executing.

 

Is there any work being done one this?  I've a pretty good
implementation of the 'import' property and a hacked version of the
ProjectHelper class . any takers?

 

- Rodney



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

Reply via email to