I don't know if this is any help to you, but starting with one of the ANT
tasks, I built an "optionalant" task, e.g.
<!--
target=any task name
handlerMustExist: if set, at least one ant file must
have the target
targetMustExist: if set, each ant file encountered
must have the target
verbose: if set indicate what files are processed
and skipped
takes a file set indicating the ant files to
execute.
-->
<optionalant target="a task name"
handlerMustExist="false"
targetMustExist="false"
verbose="true">
<fileset dir="." includes="**/build.xml"/>
</optionalant>
It allows me to run ant tasks(target) in other ant files that exist in a
directory tree. I don't need to know ahead of time which ant files will
exist, just that they implement a particular task if they wish to build a
particular task.
I haven't cleaned it up enough for submission as an optional task, but it
works well for me.
brian peterson
| -----Original Message-----
| From: Herman, Dave [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, January 09, 2002 1:09 PM
| To: 'Ant Users List'
| Subject: RE: Inter-project dependencies?
|
|
| Thanks again, T Master...
|
| How would you or anyone suggest the projects locate each
| other? My situation
| is a little different from Adarsh's, because we don't have
| one over-arching
| project with many sub-projects, but rather several projects
| on the same
| level that have somewhat complex inter-dependencies, and
| several of them
| need to be built and released as separate products.
|
| I appreciate everyone's help!
|
| Thanks,
| Dave Herman
| [EMAIL PROTECTED]
|
| > -----Original Message-----
| > From: T Master [mailto:[EMAIL PROTECTED]]
| > Sent: Wednesday, January 09, 2002 11:46 AM
| > To: Ant Users List
| > Subject: Re: Inter-project dependencies?
| >
| >
| > Understood.
| > If the jars were copied from one location to another for use,
| > your projectA
| > could then run IF the jar file existed.
| > Your projectA.jar requires ProjectB.jar.
| >
| > This is what I would do:
| > 1. Find projectB.jar from wherever, and copy to your own
| ${dist.dir}.
| > 2. If copy failed, and thus the projectB.jar is not present,
| > then build
| > should fail.
| >
| > I've never done if/then/else in ant (too confusing with all
| > the emails
| > thrown around).
| >
| > T Master.
| >
|
| --
| To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>