Tutorial :How to compile and run inter-dependent plugin jars


I have to build two eclipse-plugin projects into two separate jars with each one dependent on the other for compiling. Eclipse IDE complains about "cyclical dependency...". How do I build these plugin jars? I guess running these plugins by just putting them in the eclipse/plugin folder should be smooth.


If you have a cyclic dependency, you have two choices:

  1. You can get rid of it by putting them into one JAR. If they truly depend on each other, they really are just one entity.
  2. You can split out the packages that cause the cyclic dependency into a third JAR and deploy two plug-ins with two JARs each.


If (and only if) you really cannot get rid of this cyclical dependency, You could use a loose form of dependency between your plugins: DynamicImport-Package
(as suggested in this blog entry, with an emphasis on getting rid of the cycle though)


Or you can do a maven approach, where you deploy a versioned jar to the repository.

Then project A depends on the latest released version of B in the repository and B depends on the latest version of A in the repository.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »