Maven with OSGI and non OSGI projects

So we have the following scenario

We have projects using maven with Intellij in non osgi enviorenment, and then we have projects using eclipse in the osgi environment. Eclipse projects develop RCP applications and therefore use the plugin architecture (OSGI).

So, we have: A-maven projects organized a project in non-Osgi-enviroment B projects - maven tycho to create an application, but using the eclipse project structure with the target platform, etc. C - maven projects have organized maven dependency projects that should work on both projects A and B.

We also installed Nexus with a p2 plugin so that maven-tycho can work.

The big problem is that we cannot understand how to build C projects so that it works without problems for both projects A and B. In projects A we want maven to work as usual and reduce dependencies if necessary, But we also want this functionality in projects B (possibly with a combination of Nexus + Tycho ??).

How should we solve this problem. I did not find a good solution on how to do this. I tried the apache felix bundle plugin in maven but can't make it work the way I want. This is the right decision?

+4
source share
1 answer

I think it is best to use the Nexus P2 Repository Plugin .

You can develop and deploy standard OSGi packages for Project C using the maven-bundle-plugin , these pools are directly used in Project A through maven assemblies.

Then, using the Rexitory Nexus P2 plugin, you can also open these OSGi packages as a standard P2 repository that Project B can use through tycho assemblies.

+3
source

Source: https://habr.com/ru/post/1437946/


All Articles