问题
Our software consists of deployable server components and RCP applications. Still these applications share a lot of code.
Right now we have Maven reactors with all the code we need as a "plain" JAR, even though the Manifest information for bundles gets added as well.
And we have Tycho reactors for all our bundles that are only ever used in an OSGi context.
Which means for every technical module we have two reactors, which from an architectural perspective is completely wrong. That's why I'd like to have a single reactor.
If I put everything in a Maven reactor, I have the following problems:
- I need to maintain the Manifest.MF of bundles manually via the pom.xml
- Eclipse usually can't pick up that Maven projects are bundles (we know we need to remove
BUNDLE_ROOT_PATH
from .settings/org.eclipse.pde.core.prefs, but that's really tedious) - most importantly: we can't start the bundles as a product, since there is no target platform (or it has to be maintained parallel to the Maven dependencies)
- we can't execute GUI tests
If I put everything in a Tycho reactor however, the following happens:
- we can't use these as a dependency in our server components (that's already a knockout argument)
We can't have Maven and Tycho in the same reactor.
So is there any way to have all JARs and bundles of a project in the same reactor?
来源:https://stackoverflow.com/questions/53757888/plain-jars-and-bundles-in-the-same-reactor