ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shackelford, John-Mason" <john-mason.shackelf...@pearson.com>
Subject subant project dependency
Date Thu, 09 Oct 2003 14:16:59 GMT
Brian,

Tell me what you think of this idea--I don't know if I like it or not:

Instead of having a separate component.xml we could have an ant task
<requires projects="x,y,z"/> that we would place just under the
<description> element in each build file.

Then in the build target we'd have:
(which we'll need whether we are using this approach or not)

<computeBuildPath id="my.path">
	<fileset dir="${my.components.dir}" includes="*/build.xml" />
</computeBuildPath>

<subant>
	<path refid="my.path"/>
</subant>


Then computeBuildPath would operate as follows:

It will check a property set by <requires> to determine which components are
directly required by this component. It will then look in build files listed
in the <fileset> for the <project> element, which is the root element of an
ant build file, retrieving the project/component name from the "name"
attribute. It would then look for a <requires> element just under the root
node to find the next components to look for.

Pros:

* no extra compontent.xml to learn to use
* <requires> becomes part of the build file itself for a more organic
integration with ant; perhaps in ant 1.7 committers will just make move the
requires functionality to a requires attribute on the project element.
* checks for immediate dependencies don't require an additional xml parse.

Cons:

* may actually be more confusing than just having <computeBuildPath> look
for component.xml.
* may be easier for a human to determine dependency relationships since
component.xml will be short.
* this moves toward a single implementation for build path resolution.
Committers may want this to be more open and flexible instead of their being
one right way of describing dependencies among build files.


John-Mason Shackelford

Software Developer
Pearson Educational Measurement - eMeasurement Group

2510 North Dodge St.
Iowa City, IA 52245
ph. 319-354-9200x6214
john-mason.shackelford@pearson.com
http://etest.ncspearson.com

**************************************************************************** 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 
****************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message