kandi X-RAY | osgi-demo Summary
kandi X-RAY | osgi-demo Summary
osgi-demo
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Start .
- Stop the demo .
osgi-demo Key Features
osgi-demo Examples and Code Snippets
Community Discussions
Trending Discussions on osgi-demo
QUESTION
I'm trying to learn OSGI and figured I would build a simple rest application using Spark Servlet.
https://mvnrepository.com/artifact/com.sparkjava/spark-core/1.0
Within my maven build plugin, I embed Spark-Core
. However, after I build and run the bundle, it tells me there is a wiring package problem. So I add the package import, rinse and repeat. I'll get a different wiring package problem, so then I add the dependency, etc.
This seems like a long tedious process to add one package after another. What's the correct way to do this?
POM ...ANSWER
Answered 2018-Mar-18 at 19:56The spark core jar is already a bundle. So there is no need to embed it. Simply install it as well as its dependendencies (which is mainly jetty) in OSGi.
For your own bundle. Simply remove all inside . The defaults of the maven bundle plugin will produce what you need.
It will detect the packages you need and write Import-Package statements for them. When you then have spark-core installed as a bundle it should work fine.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install osgi-demo
You can use osgi-demo like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the osgi-demo component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page