Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Developing plugins with library dependency(How to develop a plugin with a library project as dependency)
Developing plugins with library dependency [message #549622] Tue, 27 July 2010 11:57 Go to next message
Thomas is currently offline ThomasFriend
Messages: 10
Registered: June 2010
Junior Member
Hi *,

I have following scenario:

We are developing a JEE application with an RCP client application. The RCP plugin uses a business delegate library to communicate with the server, to cache some data and to do some other fancy things. This business delegate library is not an Eclipse plugin but the Eclipse plugin depend on this business delegate.

In the development environment the Eclipse Workbench consists of a Plugin project 'rcp.client' for the RCP plugin and a plain Java Project 'business_delegate' for the business delegate. Unfortunately I have not found any way to tell Eclipse that it should bundle the business delegate as a library in the plugin. Currently I am exporting the business delegate as a jar to a lib directory in the 'rcp.client' using the Eclipse Export functionality.
This is sad since whenever I want to start my RCP application from within Eclipse I have to export the business delegate.

Is there any way to tell Eclipse that the 'rcp.client' project depends on the 'business_delegate' project and that it should include it?

Best regards,
Thomas
Re: Developing plugins with library dependency [message #549766 is a reply to message #549622] Tue, 27 July 2010 20:57 Go to previous messageGo to next message
Bruce Kelly is currently offline Bruce KellyFriend
Messages: 63
Registered: July 2009
Member
> Is there any way to tell Eclipse that the 'rcp.client' project depends on
> the 'business_delegate' project and that it should include it?
>

Convert the business_delegate project a plugin project that has the jar file
on its runtime classpath.
In the business_delegate project, export the packages that need to be used
by the rcp.client project.
In the rcp.client project import the required packages.

I assume you are using a feature to build the application, so the
business_delegate plugin needs to be added to the feature so it is included
in the exported application.

Namaste, Bruce
Re: Developing plugins with library dependency [message #550083 is a reply to message #549766] Thu, 29 July 2010 05:52 Go to previous messageGo to next message
Thomas is currently offline ThomasFriend
Messages: 10
Registered: June 2010
Junior Member
Hi Bruce,

thanks for your help.

Your tip solves my problem with the 'business_deletgate' java project. But in that case I have to change the directory layout of the 'business_delegate' project which would break the Maven build and the m2eclipse plugin integration with Eclipse. I've already tried it that way. Beside that it is perfectly ok that the 'business_delegate' is bundled as a jar file in the 'rcp.client' project since it is just a java project without any dependencies on Eclipse. In fact there must not be any dependencies to Eclipse since the 'business_delegate' is used by other (non-eclipse) clients too. I was just wondering whether there is a way to configure Eclipse to add a depending project to the classpath of the plugin so that when starting the plugin with an 'Eclipse Application' run configuration the depending project is added to the classpath of the plugin.

Best regards,
Thomas
Re: Developing plugins with library dependency [message #606361 is a reply to message #549766] Thu, 29 July 2010 05:52 Go to previous message
Thomas is currently offline ThomasFriend
Messages: 10
Registered: June 2010
Junior Member
Hi Bruce,

thanks for your help.

Your tip solves my problem with the 'business_deletgate' java project. But in that case I have to change the directory layout of the 'business_delegate' project which would break the Maven build and the m2eclipse plugin integration with Eclipse. I've already tried it that way. Beside that it is perfectly ok that the 'business_delegate' is bundled as a jar file in the 'rcp.client' project since it is just a java project without any dependencies on Eclipse. In fact there must not be any dependencies to Eclipse since the 'business_delegate' is used by other (non-eclipse) clients too. I was just wondering whether there is a way to configure Eclipse to add a depending project to the classpath of the plugin so that when starting the plugin with an 'Eclipse Application' run configuration the depending project is added to the classpath of the plugin.

Best regards,
Thomas
Previous Topic:How to impl my own quick fix after EMF validation?
Next Topic:Fragment with osgi.nl platform filter
Goto Forum:
  


Current Time: Thu Apr 18 07:28:57 GMT 2024

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

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

Back to the top