0

I have got a Java Maven project in Eclipse which imports some external plug-ins for which I do not have the source code. One of those plug-ins should be able to access some of the public classes from my project. The package/class name can be defined dynamically.

After some research I found this thread which says, that exported packages should be visible to other plug-ins. But unfortunately this does not work in my case.

Does anybody have any idea how I could give the imported plugin access to my classes? Thanks!

Community
  • 1
  • 1
user3726374
  • 583
  • 1
  • 4
  • 24
  • Exported packages are visible to other plugins which include the plugin in their dependencies - have you done that? – greg-449 Jun 10 '14 at 14:18
  • @greg-449 Okay that makes sense. But if I go to the Dependencies tab of the imported plug-in, the Add... button is greyed out. Do I have to add this manually (in text) to the manifest file? – user3726374 Jun 10 '14 at 14:21
  • This might be relevant: the imported plug-in is not my own plug-in! – user3726374 Jun 10 '14 at 14:30
  • How do you expect this plugin to use your classes even if it could access them? – greg-449 Jun 10 '14 at 14:34
  • @greg-449 I am only accessing static functions. I actually am able to get it to work if I put the plug-in's jar file on the Classpath (in the manifest Runtime tab). But this is not the way I would like to do it. – user3726374 Jun 10 '14 at 14:39
  • If the plugin exports the packages containing the static functions you can use them by adding the plugin to your plugin's dependencies. If it does not export the packages you can't use them. – greg-449 Jun 10 '14 at 14:55
  • @greg-449 I don't know if I understand correctly. What I would have to do: 1.) export package 2.) add my OWN plugin to the dependencies of the IMPORTED plugin? How can I modify the dependencies of the imported plugin? – user3726374 Jun 11 '14 at 07:11

0 Answers0