I have a maven project called Editor. I have several maven projects which are plugins for this Editor (real plugins, not maven plugins). I have no real dependency between the editor and the plugins.
The editor find the plugins at runtime in the classpath by looking for annotated classes.
When I develop the editor or a specific plugin (snapshot dependency), I would like that when the editor is started it finds the plugins (up-to-date). At the moment I simply add a dependency Editor => XxxPlugins and it's fine. When I want to release the editor, I remove all these dependencies to have a clean editor.
It was fine but now I have a specific plugin that must have a dependency to the editor. It's a real dependency, I cannot just move some classes in a third maven project because the goal is really to have an editor in an Editor...
This means I have a circular dependency Editor => Plugin => Editor. The Plugin => Editor dependency is required to compile but Editor => Plugin only to be able to see the plugin when I start the project in Eclipse.
Is there a right way to manage this kind of problem?
- I tried to change the Editor => Plugin dependency scope ("runtime", "provided", ...) but the circular dependency is still found.
- I tried with a maven profile that add the Editor => Plugin dependency only in a dev profile. But if I set Eclipse to use the dev profile, it immediately detects the circular dependency.
- I was thinking of maybe using a maven plugin that could copy some dependencies into a "plugin" folder, and add this folder to the classpath in Eclipse. But I don't think that when I will start the project in eclipse it will use the plugin.