How to make packages have their own build.xml?
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   vas_pulipati
Posted On:   Monday, January 20, 2003 10:19 PM

I worked with Unix makefiles and GNU Makefiles before,
and I like the idea of sub-directories having their
own makefiles, atleast at the package level.


I'm trying to figure how to do something similar with
Ant. It gives the flexibility to quickly build a
particular package by simply running 'ant' from the
respective folder. Also, by limiting the scope of the
package specific properties to the package itself,
I can avoid cluttering the project's build.xml


Please help. Thanks in advance.

Re: How to make packages have their own build.xml?

Posted By:   Miguel_D  
Posted On:   Thursday, March 20, 2003 11:49 AM

I wanted to do something similar (I think) but the responses here seem to answer a slightly different question (or maybe I misunderstood). Either way, this is what I did...










...





...and the rest of my build file is as if I was running ant from the root of the project. I guess the most important part is the basedir at the top. Using this method, I am able to keep all of my source files for all of my projects under the same root folder and I don't have to compile all of the projects when I only want to compile one of them. Good luck.

Re: How to make packages have their own build.xml?

Posted By:   Erik_Hatcher  
Posted On:   Tuesday, January 21, 2003 06:12 PM

It really goes against the grain of Ant to do this type of build process. Sure, it can be done as Jan stated, though. I do not recommend it, however. Its easy enough to construct a build file to build the entire tree, and if you need conditional partial building, you can do that with conditional patternsets and control with Ant properties nicely.

Re: How to make packages have their own build.xml?

Posted By:   Anonymous  
Posted On:   Tuesday, January 21, 2003 04:28 AM

If you really want to have multiple buildfiles you can write them ... In your "main" buildfile you should invoke the "sub" buildfiles. There were some threads in the Ant-Dev-Mailinglist about an -Task supporting Filesets:
And I suggest importing common code snippets via -Task (Ant 1.6 CVS Head) or XML-Entities. So you have to maintain only one codebase.
About | Sitemap | Contact