I have an open-source project that I added to my project source. The oss-project currently builds stand-alone using ant and its build.xml.
I want to build this project as a part of my project. My directory structure looks like this:
my-project\
build.xml
oss-project\
build.xml
{all the code}
I tried to import the oss-project\build.xml into my-project\build.xml.
<import file="${source_base}/oss-project/build.xml"/>
My build.xml defines basedir, source.base etc. variables and the imported xml also contains these variables. But, when i try to build by running "ant" at my source root, while building the oss-project, it's using the variables defined in parent build.xml.
I could probably create unique names be prefixing all variables in my oss-project\build.xml with that project name. But, its starting to look ugly. And then hard to keep it in sync in future as well.
Is there a way by which the variables defined inside the child build.xml are not overridden by the once in parent build.xml?