ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peterson, Brian" <Brian.Peter...@westgroup.com>
Subject RE: Inter-project dependencies?
Date Wed, 09 Jan 2002 19:20:48 GMT
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:dherman@intrado.com]
| 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
| dherman@intrado.com
| 
| > -----Original Message-----
| > From: T Master [mailto:tmaster@iknowledgeinc.com]
| > 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:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

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


Mime
View raw message