Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How to setup the Debug configuration to use my bundles as jars?
How to setup the Debug configuration to use my bundles as jars? [message #605093] Wed, 17 March 2010 11:43
Aitor is currently offline AitorFriend
Messages: 2
Registered: July 2009
Junior Member
Background:
I'm currently using the OSGi Equinox security layer and the Conditional Permission Admin, and it works perfectly.

The thing is that there is this nice condition called Bundle Signer Condition, which allows to query the information of a bundle's signature, this is, the certifcate. You can then use this information to decide what permissions are you going to give to the soliciting bundles. Anyway the issue does not revolve in how the OSGi ConditionalPermissionAdmin service works.

My issue revovles in the fact that I want to use it to give permissions to bundles I'm creating. So far so good, I only need to create a JAR because (and correct me if I'm wrong) I can only sign JAR files (at least using jar signer). If someone know how to sign a folder (the bin folder for my projects) it would probably solve my issues.

However I can create the JAR file and sign it. I can even automate the task by using an ANT build (the one automatically egenrated by PDE), configuring the default target to build.update.jars and adding a jarSigner task. It works nicely and I have my signed bundle.

Issue:
My question now is, how do I configure the PDE debbuger, this is, my debug configuration, so that it uses the .jar file inestead of directing to the project's bin folder.

I already know that this is controlled by the config.ini file that PDE can create automatically or you can provide manually. What I have running now is a modified version of the PDE automatically created config.ini file (which can be located more or less at .metadata/org.eclipse.pde.core/<yourconfigname>/config.ini) where I have MANUALLY (this is a serious pain) changed the entries under osgi.bundles= from referencing my projects to referencing the jars.

Then I say to the configuration to use my config.ini file and the eclipse that starts effectively uses my bundles. I have yet to test if the debugger stops correctly at the breakpoints and if I'm doing ok with attaching the source code but those are future problems.

My MAJOR issue is that, if I supply manually the config.ini, any new plugin I create, and new dependencies to other plugins that arise I'll need to update and calculate them manually. Another option is to let PDE do a new config.ini file, start a debug (so it actuallyc reated the file), abort the debug (its not gonna work anyway), take the config.ini and change the references again (MANUALLY) to my .jars.

Since I'm not big fan of manual I'm about to start to automate all this using the ANT builds and some JAVA and regex. However I had to make sure that I'm doing something that's already done and I'm missing so, here is the question:

IS THERE A BETTER SIMPLER WAY TO ACHIEVE MY GOAL? DOES PDE HELP ME AUTOMATE THIS IN ANY WAY?

Thanks in advance.
Previous Topic:How to setup the Debug configuration to use my bundles as jars?
Next Topic:Opening an Eclipse editor from an HTML link
Goto Forum:
  


Current Time: Tue Mar 19 08:18:21 GMT 2024

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

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

Back to the top