Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build eclipse project with ant

I am developing JSR 268 compliant portlet and utility with eclipse. Now, the utility is designed to be a separate JAR from the portlet itself.

Does anyone now how to write an ant build.xml that will 1. Compile and JAR my utility class 2. Move the JAR to the ./lib folder of the portlet 3. Compile and maybe even delpoy the portlet to a tomcat running on localhost?

My biggest problem right now are the build-time dependencies. I dont want to hardcode all the folders as I share this project with two other developers which are on another platform. Is it possible to reuse the buildpath from eclipse?

Thank you in advance, Felipe

like image 286
DodoFXP Avatar asked Apr 03 '11 15:04

DodoFXP


People also ask

Does Eclipse support Ant?

The Eclipse platform provides a recent stable version of Ant as a plug-in library. The installed version of the org. apache. ant plug-in can be found in Help > About Eclipse > Installation Details > Plugins.

How do I run Ant command in Eclipse?

Go to “Run As” icon and click “Open External Tools Dialog…” A new pop-up window for External Tools will appear with an option “Ant Build” Right click on “Ant Build” and click on option “New” A new ANT build task will be created and will look like the following.


1 Answers

Does this wizard help

Rigth-click on project -> Export ... -> Ant buildfiles.

?

like image 141
Michael Spector Avatar answered Sep 22 '22 18:09

Michael Spector