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:
- 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.
- You can split out the packages that cause the cyclic dependency into a third JAR and deploy two plug-ins with two JARs each.
Joachim Sauer : +1 cyclical dependencies will hurt you again and again. Finding solutions for every single problem they cause can be come very tiring.duffymo : Java itself fell into it. java.lang, java.io, and java.util are all one monster package. -
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.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.