views:

56

answers:

1

I have several projects open in an Eclipse workspace. Like so:

com.harbl.project.one
com.harbl.project.two
com.harbl.project.three

I would like to export those as JARs in a batch such that I wind up with the following JAR files:

./com.harbl.project.one.jar
./com.harbl.project.two.jar
./com.harbl.project.three.jar

Is this possible with one of the Eclipse wizards or working sets? Is my only option to export each one individually?

+2  A: 

If you're after a long term solution, then maven is an option. You can set up each project with it's own pom, and you can manage each one separately, but with a parent pom for building everything.

Take a look at http://maven.apache.org/

If you're looking to simply get the right class files into the right jars, use ANT.

MatthieuF
I would agree, if you want each of these built as their own jar, setting up maven will make it much easier, and allow for management of the projects/jars.
broschb
Is it possible in Eclipse? Creating an entire build environment seems excessive. What I'm doing is keeping a local checkout of a FOSS library based on EMF that my team uses. I'd like to be able to easily just pop into Eclipse, get the latest from SVN, do the model regeneration manually, then generate the JARs. Everything but the last step is easy enough to do by hand so I can review the updates.
Freiheit
If you're looking for something to simply aggregate the correct class files into the correct jars, then look at ANT. I've edited the answer.
MatthieuF
Ant will do just fine. Accepted.
Freiheit