So I’ve come to a point when I need to speed up the build process of my projects cause the way I’m doing it now is not very logical I think. I’ve a /lib folder within each project’s folder with basically almost the same jars and each /lib folder’s jar’s are referenced to appropriate project in Eclipse (3.5).
I use a Ant script to clean, build and create the jar for each project and have the class path in Ant set to the /lib folder so that the build would be successful.
<property name="dir.lib" value="lib" />
<path id="classpath">
<fileset dir="${dir.lib}" includes="*.jar" />
</path>
Then there is a thing that one of the projects depend on another project in the work space. I’ve them linked in Eclipse, but to build successfully with Ant I need to first build the projects individually and place the project jars in the /lib folder of the project who depends on it. So it all takes quite time..
I see that I’ve a repository of jars on server (but it’s outdated and they haven’t left any ivy configurations) so maybe the best thing to do would be to get the jars from server repository when doing builds? And then publish the newly created jars on server repository?
What should I do? And how can it be done?
I agree with WhiteFang32 – using Maven build with parent project and modules will make managing dependencies easier. However, if you have lot of dependencies that are being built from your local projects and you do not have (do not want to create and manage) a repository then ANT with cusom targets is the best and the simpliest solution.
Generally the build process can be divided toi following stages:
The following article can help you to achieve the goals mentioned in 2 and 3 above by simple ANT scripting.
http://www.exubero.com/ant/dependencies.html
Good luck!
Aviad