Schodemeiss
Schodemeiss

Reputation: 1174

Export multiple JAR from Multiple Packages in Eclipse

I currently have one project that currently contains multiple packages. These packages make up an Eclipse Plug-in (I felt this was important enough to make bold).

What I wish to do is export, for example: "package1" as "package1.jar" and "package2" as "package2.jar".

I should mention that I can export "package1" successfully using the "Eclipse Product Export Wizard", but it only makes "package1.jar". How can I specify a second package in here to export as a separate jar?

Thanks

PS. I can right click on the package and hit "Export - Java - Runnable Jar File" which creates a perfectly good working version of "package2", but I wish this to be part of the export / build process.

Upvotes: 0

Views: 2014

Answers (2)

Tomer
Tomer

Reputation: 17930

If you want your build automated, you better use a tool like Maven.

There is also a maven plugin for Eclipse called m2eclipse, that can make your life much easier.

Upvotes: 0

madhairsilence
madhairsilence

Reputation: 3870

While Exporting, in one of the screen, it will ask you to select the files/packages to export. Exactly in the screen where it says Select Resource to Export

Repeat the export process for every package by selecting and deselecting appropriate package

For Example

If you want to export package3 as package3.jar, deselect all other packages.

You can even select individual files

Upvotes: 1

Related Questions