简体   繁体   中英

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.

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM