OSGi - How mature is this technology?

前端 未结 4 2072
离开以前
离开以前 2021-01-31 21:10

I have a requirement where I need to share some web resources (jsp, html, js, images, css etc.) across different

4条回答
  •  不思量自难忘°
    2021-01-31 22:05

    While OSGI might be a solution, it might be a bit overkill (and, as Bozho pointed out, you'll need an OSGI capable container). Maybe have a look at How to share resources across projects in Maven for other options:

    • Cut and paste them.
    • Use Assembly and Dependency plugins
    • Use the maven-remote-resources-plugin

    In this blog I’ll show how to do the second option since in my opinion, it is currently the most stable and flexible. In the future, I’ll try out the maven-remote-resources-plugin and write up a tutorial.

    EDIT: To answer a comment from the OP. Yes, the idea it to create an assembly of the shareable web resources and to use the maven-dependency-plugin to pull and unpack the assembly in the "resource-consumer" projects. All this is explained and detailed in the blog post mentioned above. Let me know if anything is unclear in it.

提交回复
热议问题