Re: ant inheritance
On Thursday, July 5, 2012 11:30:37 AM UTC-7, Greg wrote:
I am trying to build an ant build system where each component builds the =
things that it depends on. Each thing that they depend on are in different=
build files. Subsequently, I use the include task. However, I run in to =
a problem when say component 1 needs to build component 2 and component 2 n=
eeds to build component 3. Ant tells me that when I told it to build compo=
nent 1 that it doesn't know the targets in component 3. How do I get 1 to =
inherit the includes all the way down the line without explicitly telling i=
t about all the components that anyone depends on?
Hmm. I think that it might help for you to post the build.xml.
You might just have some subtly off way of invoking things.
Without details of your project structure and how you're trying
to do things now, it's hard to suggest anything other than Ant
subtasks.
The build.xml for component 1 should not be hitting any targets
in the component 3 build.xml, nor even in the component 2 build.xml.
ANother way and likely better is to configure the antecedent
projects as libraries, which if they really are components as you
claim should be straightforward. If it isn't straightforward, perhaps
they aren't really components.
Then make the JAR files for each library as dependencies for the project(s)=
that relies(y) on them.
--
Lew