ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject RE: Cross Project Dependencies
Date Fri, 16 Aug 2002 17:16:59 GMT
The idea here may be to build several projects from
the same build file without referencing each as a
target within the build file.  This is definitely
possible.  It may also be possible to make
dependencies work as well; the easiest way to find out
would probably be to try it.  As I recall some mention
was made of listing the dependencies so that they
could have the same targets invoked for them.  This
brings to mind the extremely useful ant-contrib
package at Sourceforge and its (my favorite) <foreach>
task.  I think the hardest part here may be deciding
how to store the dependencies for each subproject. 
Once you have that and can read them in you should be
able to use foreach to invoke ant on your same
buildfile...

-Matt


--- Geoff Meakin <geoffm@isocra.com> wrote:
> I dont quite understand your first email, but it
> sounds to me like
> <targets> are the way to go forward, since they were
> designed for
> this very purpose.
> 
> If you dont want to have 20 targets because you dont
> want to 
> rewrite <compile> tasks each time, why not shift
> those to
> a parametisable target, and call them with different
> information
> from each of your 20 targets. This sounds like the
> most sensible
> way of doing it to me. 
> 
> Otherwise is there any chance you could elaborate on
> your
> original problem?
> 
> E.g.
> 
> <target name="a" depends="b,c">
>   <antcall target="compile-me">
>     <param name="from" value="a"/>
>   </antcall>
> </target>
> 
> <target name="b" depends="e">
>   <antcall target="compile-me">
>     <param name="from" value="b"/>
>   </antcall>
> </target>
> 
> <target name="compile-me">
>   <echo message="compiling ${from}"/>
>   <javac ...
>   etc..
>   </javac>
> </target>
> 
> Cheers
> -Geoff
> 
> 
> --
> 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>
> 


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

--
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