If I have a number of projects with some similar build needs, it's
reasonable to define reusable targets in a "commons" project build.xml
file and import that file from each project's build.xml file.  What are
good strategies for reusing those targets effectively, when they
certainly require numerous parameters to work properly?  For instance, a
reusable "junit" target would likely depend on something like a
"compile-test" target, which would need to be parameterized with the
source directories to compile, and the "junit" target would need to be
parameterized with the required classpath.

If I were constructing this, I would aim for all the reusable targets to
be called with "ant-call" along with "param" elements.

If I were building all of this in a single build.xml, I would define
"path" properties that are referenced with "refid" attributes.  How
would this work if I were passing those path parameters with "ant-call"?

If I were to define a path parameter in each of the child build.xml
files, using the same "id" value, what happens when a target from the
parent build.xml is executed, which references that path id value?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to