Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Dependencies for imported plug-ins (maven)
Dependencies for imported plug-ins (maven) [message #1385771] Wed, 11 June 2014 07:17 Go to next message
Alexander Klatt is currently offline Alexander KlattFriend
Messages: 59
Registered: April 2014
Member
Hi,

an imported plug-in (not my own) needs access to a class from my own plug-in (to use a static function). I export the package with this class.

What else do I need to do to make my class visible to the imported plug-in?
Thanks for any advice!
Re: Dependencies for imported plug-ins (maven) [message #1385773 is a reply to message #1385771] Wed, 11 June 2014 07:26 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5803
Registered: July 2009
Senior Member
This can't work - a plug-in you import can never have a dependency on
yourself because this would result into circle.

BTW: Do you really control the other plug-in, who is in charge of it?

Tom

On 11.06.14 09:17, Private Name wrote:
> Hi,
>
> an imported plug-in (not my own) needs access to a class from my own
> plug-in (to use a static function). I export the package with this class.
>
> What else do I need to do to make my class visible to the imported plug-in?
> Thanks for any advice!
Re: Dependencies for imported plug-ins (maven) [message #1385774 is a reply to message #1385773] Wed, 11 June 2014 07:39 Go to previous messageGo to next message
Alexander Klatt is currently offline Alexander KlattFriend
Messages: 59
Registered: April 2014
Member
Okay, I understand that this would be kind of a circular dependency. But on the other hand I can get it to work by doing the following:
-copy the jar file (of the imported plugin) to my project directory
-add this jar file to the classpath in the manifest->runtime tab.

edit: but I would like to keep the imported plug-in in maven.
edit2: sorry, what do you mean by "control" the other plugin? I only have got the jar file. The reference to outside classes is done in a text configuration file.

[Updated on: Wed, 11 June 2014 07:59]

Report message to a moderator

Re: Dependencies for imported plug-ins (maven) [message #1385781 is a reply to message #1385774] Wed, 11 June 2014 08:01 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5803
Registered: July 2009
Senior Member
right because then it is part of the same classloader. I'm still not
getting why the external plugin could know a package from your code to
import it, this makes no sense to me.

BTW: Can you please update your forum name - I only see you as "Private
Name" and I prefer to talk to real people.

Tom

On 11.06.14 09:39, Private Name wrote:
> Okay, I understand that this would be kind of a circular dependency. But
> on the other hand I can get it to work by doing the following:
> -copy the jar file (of the imported plugin) to my project directory
> -add this jar file to the classpath in the manifest->runtime tab.
Re: Dependencies for imported plug-ins (maven) [message #1385814 is a reply to message #1385781] Wed, 11 June 2014 11:40 Go to previous messageGo to next message
Alexander Klatt is currently offline Alexander KlattFriend
Messages: 59
Registered: April 2014
Member
The external plugin can use static functions which names are given to the plugin by declaring them in a configuration file.

An example (my case): The plugin is an SQL database manager. I would like to call custom SQL invoked Java methods.

I've also tried to export the classes as a plug-in jar and then reimport them, but this seems to not work either.

[Updated on: Wed, 11 June 2014 11:43]

Report message to a moderator

Re: Dependencies for imported plug-ins (maven) [message #1385891 is a reply to message #1385814] Thu, 12 June 2014 06:14 Go to previous message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 415
Registered: December 2010
Location: Germany
Senior Member
Maybe "Buddy Class Laoding" is what you are looking for:
https://wiki.eclipse.org/Context_Class_Loader_Enhancements#Buddy_Class_Loading
Previous Topic:Where have the e4 integration builds gone?
Next Topic:using ECommandService and Preferences in LifecycleManager
Goto Forum:
  


Current Time: Thu Jul 30 08:19:25 GMT 2015

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

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