Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Programmatically build eclipse plugin(Looking to programmatically export an eclipse plugin project as a JAR file)
Programmatically build eclipse plugin [message #1007894] Fri, 08 February 2013 01:13 Go to next message
Phillip Drew is currently offline Phillip DrewFriend
Messages: 77
Registered: October 2012
Member
Basically I'm looking to be able to programmatically export an Eclipse plugin project as a JAR file (ideally with exactly the same result as using the Export wizard through the UI).

The exported JAR needs to have the compiled .class files and ideally should follow the manifest (and build.properties) file in the project.

I've tried using the org.eclipse.jdt.ui.jarpackager package but it's either not what I'm looking for or I can't figure out how to use it. I always end up with a JAR file that has clearly not followed the build.properties file, has overwritten the manifest file to just have the manifest version, and doesn't include the compiled .class files.

Given I can't seem to find any useful examples/tutorials of using the JDT classes to export a plugin it seems likely it's not the tool I need, in which case please point me in the right direction!
Re: Programmatically build eclipse plugin [message #1007970 is a reply to message #1007894] Fri, 08 February 2013 07:26 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
The programmatic export is done by PDE through PDE-Build, so you should
browse the PDE source code to findout what they are calling.

Tom

Am 08.02.13 02:13, schrieb Phillip Drew:
> Basically I'm looking to be able to programmatically export an Eclipse
> plugin project as a JAR file (ideally with exactly the same result as
> using the Export wizard through the UI).
>
> The exported JAR needs to have the compiled .class files and ideally
> should follow the manifest (and build.properties) file in the project.
>
> I've tried using the org.eclipse.jdt.ui.jarpackager package but it's
> either not what I'm looking for or I can't figure out how to use it. I
> always end up with a JAR file that has clearly not followed the
> build.properties file, has overwritten the manifest file to just have
> the manifest version, and doesn't include the compiled .class files.
>
> Given I can't seem to find any useful examples/tutorials of using the
> JDT classes to export a plugin it seems likely it's not the tool I need,
> in which case please point me in the right direction!
Re: Programmatically build eclipse plugin [message #1008037 is a reply to message #1007894] Fri, 08 February 2013 15:43 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
Hint #1: exporting a plug-in is implemented in PDE, not JDT.
Hint #2: Plug-in spy (Alt-Shift-F1) tells you for each view / dialog who provides it and even which class etc.
Re: Programmatically build eclipse plugin [message #1008145 is a reply to message #1008037] Sun, 10 February 2013 22:40 Go to previous message
Phillip Drew is currently offline Phillip DrewFriend
Messages: 77
Registered: October 2012
Member
Thanks for your help - I wasn't sure between PDE and JDT, and JDT had a promising looking API that lead me astray
Previous Topic:WTP does not refresh when updating external jar
Next Topic:Run configuration with "-ws" argument unexpected behavior
Goto Forum:
  


Current Time: Thu Mar 28 17:13:37 GMT 2024

Powered by FUDForum. Page generated in 0.06375 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top