Scala in OSGI container?

前端 未结 4 1357
[愿得一人]
[愿得一人] 2021-01-30 01:42

How can I code my bundle in Scala and then deploy it into OSGI container?

Do I compile it into \"java\" first or can i deploy scala straight into OSGI and use some kind

4条回答
  •  孤城傲影
    2021-01-30 02:20

    There is nothing special to it: write your code in Scala and wrap it up as an OSGi bundle by providing the necessary bundle meta data and service descriptors as you would do with Java.

    Apache Maven can help you in the process. Have a look at the Guggla Project (a Scala script engine) for a working example. The maven-bundle-plugin in the pom.xml takes care of generating and including the bundle meta data in the final jar file. It refers to the service descriptor xml file which you need to provide.

提交回复
热议问题