An OSGi Declarative Services (DS) component that starts and registers a servlet as a service. The servlet returns a simple "Hello world" style HTML page.

steinarb 30f07ae8a7 Merge pull request #27 from steinarb/dependabot/maven/org.apache.maven.plugins-maven-surefire-plugin-3.5.4 14 小时之前
.github e4ec34ffe5 Bump actions/setup-java from 4 to 5 3 周之前
src abed585164 Use var for local variables 1 年之前
.editorconfig ccdc87fffa Initial commit. 7 年之前
.gitignore ccdc87fffa Initial commit. 7 年之前
LICENSE ccdc87fffa Initial commit. 7 年之前
README.org a24f324925 Replace travis-ci CI build with github actions CI build 2 年之前
pom.xml 34f1a33f94 Bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.3 to 3.5.4 16 小时之前

README.org

A simple Pax Web Whiteboard Extender Application

This is a minimal "Hello world" application that will plug into the Pax Web Whiteboard Extender with the local path "/hello" where it returns an HTML page.

Status

file:https://github.com/steinarb/hello-karaf-demo/actions/workflows/hello-karaf-demo-maven-ci-build.yml/badge.svg file:https://coveralls.io/repos/github/steinarb/hello-karaf-demo/badge.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=alert_status#.svg file:https://maven-badges.herokuapp.com/maven-central/no.priv.bang.demos/hello-karaf-demo/badge.svg

file:https://sonarcloud.io/images/project_badges/sonarcloud-white.svg

How to install

file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=sqale_index#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=coverage#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=ncloc#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=code_smells#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=sqale_rating#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=security_rating#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=bugs#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=vulnerabilities#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=duplicated_lines_density#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=reliability_rating#.svg

    This is how to build and install the servlet:
  1. First download and install apache karaf
  2. In the apache karaf command line, install the feature that pulls in the servlet with dependencies
  3. #+BEGIN_EXAMPLE feature:repo-add mvn:no.priv.bang.demos/hello-karaf-demo/LATEST/xml/features feature:install hello-karaf #+END_EXAMPLE
  4. After this, the servlet will be listening for GET requests, at the local path "/hello" on the karaf web server, e.g. http://localhost:8181/hello for a karaf server started locally, with default settings

To uninstall the servlet from karaf

    This is how to uninstall the servlet from karaf:
  1. At the karaf console prompt, give the following command:
  2. #+BEGIN_EXAMPLE feature:uninstall hello-karaf-demo #+END_EXAMPLE

This will disconnect the servlet from the Pax Web Whiteboard Extender and uninstall the servlet, and all dependencies (e.g. Pax Web) that has been pulled in by this feature.

However, if a different feature has pulled in the same dependencies, the dependencies won't be uninstalled until everything that has required them is uninstalled.

License

This software project is licensed under Apache License v. 2.

See the LICENSE file for details.