Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extract eclipse project .classpath dependencies into ant script

Tags:

eclipse

javac

ant

I have a list of Eclipse projects that I would like to compile based on the existing project configuration.

As far as I can tell, if an ant script could read the .classpath files, it would pretty much be able to infer the project dependencies and perform a "javac" compilation in the right order. This would save time in describing the same dependencies again in the ant script or a Makefile.

The dependencies I am interested in are JAR Dependencies, JRE dependencies, and inter-project dependencies. These are -- as far as I can tell -- part of the .classpath XML file.

Any ideas on how Eclipse project dependencies could used in an ant script?

like image 277
Nick Avatar asked Jun 29 '11 08:06

Nick


1 Answers

Right click on your Project -> Export "General/Ant Buildfiles". Choose the projects and there you go.

Otherwise... I have some experience with ant4eclipse and it is a hassle to get it stable.

Go check Buckminster or Maven Tycho for a good solution.

like image 73
FlorianOver Avatar answered Sep 30 '22 03:09

FlorianOver