Good way to “wrap” jars for OSGi with Maven

后端 未结 4 1705
名媛妹妹
名媛妹妹 2021-02-10 03:32

I was looking at the PAX tools on OPS4J for example: this one and I thought I\'d found a nice way to:

  • Specify an artifact
  • Create an assembled jar (jar tha
4条回答
  •  误落风尘
    2021-02-10 04:14

    We do something similar to what you are describing. For example, we have an internal version of Apache QPid. It comes as 6 jars (client, core, common, backports, etc) which you would rarely use individually. We have one POM with BND which takes all the jars, and makes one uber-osgi-jar from them.

    Steps:

    1. Declare your dependencies (we have the jars, so we declared them as system deps.)
    2. Import build plugin maven-bundle-plugin (2.1.0)
    3. Set correct instructions for export, private and import packages
    4. Execution of 'wrap' goal at 'package' phase

提交回复
热议问题