Please excuse my ignorance if I don't quite understand all the power that Ant provides me. I'm not sure that I follow your comments exactly but I can explain to your why I thought that <ant> wouldn't quite work for me.
The end effect I'm trying to achieve is as follows. In any project that a developer is coding one build.xml file should exist. I haven't mapped it yet to exactly what it should look like in ant but probably something like:
<property name="MODULE_VERSION" value="1.1.14"/
<property name="MODULE_DEPENDENCIES" value="list of jars that this project depends on. Used to setup classpath. This is though not a full path, manipulation needs to happen in common.xml"/>
.... include common file which defines all targets and rules for compiling
idl,java,pcml (something specific in our environment), etc something to the effect of ....
As I understand, by using <ant> as was suggested to me by Jerry Li, I would need to for each target (17 in total) have to do a replecation of the <target>s defined in common.xml in the above build.xml. I would thus save on not having to expose the body of the target in the above file or the properties I need to achieve the completion of the target, but I would still add a lot of extra targets in the build.xml file. I also seemed to experience some difficulty in accessing properties declared in the build.xml file within the common.xml file. This could though just be a clear case of me not having RTFM'd enough yet. :)
Am I wrong in my understanding of how <ant> can/should be used ? Is there some way in which I could achieve what I described above ?
Thanks in advance
From: Diane Holt [mailto:firstname.lastname@example.org]
Sent: 16 October 2001 04:19
Subject: RE: Including a common build file with common targets.
--- Albertus Vermeulen <AlbertusV@meb.co.za> wrote:
> Thanks for your input, your solution would mean less lines in the
> build.xml files, but doesn't really provide me with the solution I'm
> looking for. I'm really looking for an equavalent of include in
> makefiles. In our development environment we have seperate components
> that developers are working on. They all need to make the same targets,
> but for their own projects. We currently maintain these "make" targets
> in one file and this ensures that there is very little clutter in the
> Makefiles of each developer. This can't be changed when we move to Ant.
Can you explain a bit more why using the <ant> task won't work for you? I
have a "common" target (eg.) for building parsers in my "main" build.xml
file that lives at the top of the user's workspace (which can be
anywhere). Building a parser in a sub-buildfile <ant>'s the common parser
target, passing the properties it needs to use. That sounds like what
you're looking to do, but maybe I'm missing something.
Do You Yahoo!?
Make a great connection at Yahoo! Personals.