Skip to main content



      Home
Home » Newcomers » Newcomers » One Library for a lot of plugins
One Library for a lot of plugins [message #478646] Thu, 06 August 2009 06:51 Go to next message
Eclipse UserFriend
hello everybody,

how can i add a library to a plugin for more than 2 plugins available?

for example i add jdom library in the first plugin and in the 2nd and 3rd
plugin. the 2nd and 3rd plugin is reference to the 1st plugin.
so i copy the jdom.jars to the projectfolder of this tree plugins and set
it in the runtime of the plugin.xml.

are there an easier way to do it?

has anybody an idea?
Re: One Library for a lot of plugins [message #478709 is a reply to message #478646] Thu, 06 August 2009 09:36 Go to previous messageGo to next message
Eclipse UserFriend
Hello

You have to wrap your external jar file in a separate plug-in and then
add dependencies from your plug-ins to that plug-in.

Details can be found here:
http://owl-eclipse.projects.semwebcentral.org/CreateLibraryP lugin.html
http://vannevarvision.wordpress.com/2007/03/08/making-extern al-libraries-available-as-an-eclipse-plug-in/

HTH

Michael
Re: One Library for a lot of plugins [message #478728 is a reply to message #478709] Thu, 06 August 2009 11:01 Go to previous messageGo to next message
Eclipse UserFriend
Hi

Another, possibly even ore elegant possibility than the one I mentioned
in my first mail is to convert the jar library into an OSGi bundle.

If the jar does not already contain the necessary manifest, you may use
the bnd tool to convert the jar.

http://www.aqute.biz/Code/Bnd

In a second step you might consider filing a request against the
project of the library to provide the manifest with their packages.

HTH

Michael

> Hello
>
> You have to wrap your external jar file in a separate plug-in and then
> add dependencies from your plug-ins to that plug-in.
>
> Details can be found here:
> http://owl-eclipse.projects.semwebcentral.org/CreateLibraryP lugin.html
> http://vannevarvision.wordpress.com/2007/03/08/making-extern al-libraries-available-as-an-eclipse-plug-in/
>
> HTH
>
> Michael
Re: One Library for a lot of plugins [message #478782 is a reply to message #478728] Thu, 06 August 2009 16:36 Go to previous messageGo to next message
Eclipse UserFriend
thanks for the fast reply, but now i have another problem.

i have 2 plugins (plugin a and plugin b).
if i want to use class a from plugin a in plugin b i have to depend it in
plugin a. and if i want to use class b in plugin a, so i have to depend it
in plugin b too. so i get a cycle depend and it doesnt work?

how can i solve this problem?

greets

DC
Re: One Library for a lot of plugins [message #478808 is a reply to message #478782] Thu, 06 August 2009 22:20 Go to previous messageGo to next message
Eclipse UserFriend
Chau wrote:
> thanks for the fast reply, but now i have another problem.
>
> i have 2 plugins (plugin a and plugin b).
> if i want to use class a from plugin a in plugin b i have to depend it
> in plugin a. and if i want to use class b in plugin a, so i have to
> depend it in plugin b too. so i get a cycle depend and it doesnt work?
>
> how can i solve this problem?

You have to eliminate the circular dependency with a better design. If
you describe the details of how & why both plug-ins depend on each
other, we might be able to offer some concrete suggestions.

Eric
Re: One Library for a lot of plugins [message #478832 is a reply to message #478782] Fri, 07 August 2009 03:41 Go to previous message
Eclipse UserFriend
Hi

Well, then you need to pull out all the common classes from your
plug-ins and put them into (a) separate bundle(s). This should be
done in a way that there are no circular dependencies.

HTH

Michael
Previous Topic:Frame Focus
Next Topic:Problem with Internationalization
Goto Forum:
  


Current Time: Fri Sep 26 13:33:51 EDT 2025

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

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

Back to the top