I'm trying to compile down a set of plug-ins (ultimately OSGi bundles) into a feature using Eclipse PDE tools. I have a custom Target Platform based on the Spring framework.
When I export the feature through Eclipse's Export Wizard the feature builds successfully, however, when I try to generate an Ant build script from the feature.xml file I receive an error about "cycles". After doing some research, I found out there's an "Allow for binary cycles in target platform" checkbox in the Export Wizard -- unchecking it produces the same result I see when trying to use PDE tools to generate the Ant build file.
I've tried saving the Ant build file from the Export Wizard, but when I execute the Ant build file I receive the same error indicating a cycle exists (and it references the target platform bundles).
Additionally, I've tried setting "allowBinaryCycles = true" in the build.properties file and also as a property on the Ant Build script -- neither affected the result.
How do I run the generated Ant build file from the Export Wizard such that binary cycles are allowed in the target platform?
Edit: To be clear, the error here exists within the Target Platform (ie: the Spring Framework!). It turns out a cycle exists in Spring Framework between the Context and ORM bundles. This is somewhat annoying, and two decent workarounds exist:
- Exclude the ORM bundle if it's unneeded (turns out this was my best solution)
- Remove the dynamic dependency on the Context bundle from the ORM bundle.
Some discussion on the Spring Forums assisted in resolving this issue.
These solutions are particular to Spring, of course. There seems to be a second issue -- this time with Eclipse as a builder -- that the option to allow these binary cycles (however wrong and awful they may be) only exists in the GUI version of the builder. One would hope that eventually this option will make its way into the Ant build tasks.