ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rodney Aiglstorfer" <rod...@aiglstorfer.com>
Subject RE: ANT needs an 'import' task
Date Sun, 14 Apr 2002 10:10:27 GMT
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:rodney@aiglstorfer.com] 
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:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message