{"id":28479788,"url":"https://github.com/eclipse-osgi-technology/jakartarest-osgi","last_synced_at":"2026-03-11T22:01:47.650Z","repository":{"id":176588081,"uuid":"657145147","full_name":"eclipse-osgi-technology/jakartarest-osgi","owner":"eclipse-osgi-technology","description":"Glassfish Jersey based implementation of the OSGi Jakarta RESTful Web Services Whiteboard specification","archived":false,"fork":false,"pushed_at":"2026-01-15T16:22:49.000Z","size":408,"stargazers_count":5,"open_issues_count":12,"forks_count":6,"subscribers_count":9,"default_branch":"main","last_synced_at":"2026-02-24T18:14:58.160Z","etag":null,"topics":["jakarta","osgi","rest","whiteboard"],"latest_commit_sha":null,"homepage":"https://projects.eclipse.org/projects/technology.osgi-technology","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eclipse-osgi-technology.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE.md","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-06-22T12:17:21.000Z","updated_at":"2025-12-12T14:48:16.000Z","dependencies_parsed_at":"2023-10-23T12:35:44.315Z","dependency_job_id":"6e278668-dea5-4609-af0c-2d026c5b7187","html_url":"https://github.com/eclipse-osgi-technology/jakartarest-osgi","commit_stats":null,"previous_names":["osgi/jakartarest-osgi","eclipse-osgi-technology/jakartarest-osgi"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/eclipse-osgi-technology/jakartarest-osgi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-osgi-technology%2Fjakartarest-osgi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-osgi-technology%2Fjakartarest-osgi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-osgi-technology%2Fjakartarest-osgi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-osgi-technology%2Fjakartarest-osgi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclipse-osgi-technology","download_url":"https://codeload.github.com/eclipse-osgi-technology/jakartarest-osgi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-osgi-technology%2Fjakartarest-osgi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30404084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T21:51:19.558Z","status":"ssl_error","status_checked_at":"2026-03-11T21:50:57.892Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jakarta","osgi","rest","whiteboard"],"created_at":"2025-06-07T18:30:29.800Z","updated_at":"2026-03-11T22:01:47.606Z","avatar_url":"https://github.com/eclipse-osgi-technology.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OSGi Technology Whiteboard Implementation for Jakarta RESTful Web Services\r\n\r\nThis is a OSGi Whiteboard implementation for Jakarta RESTful Web Services based on Eclipse Jersey.\r\n\r\nhttps://docs.osgi.org/specification/osgi.cmpn/8.1.0/service.jakartars.html\r\n\r\nhttps://eclipse-ee4j.github.io/jersey/\r\n\r\nThis implementation is **compliant** in respect to the corresponding OSGi Whiteboard specification.\r\n\r\nIt uses:\r\n\r\n* Jersey 3.1.3\r\n* HK2 3.0.5 \r\n\r\nWhen you want to run it, you currently have the choice between two different adapters / connectors:\r\n\r\n* **org.eclipse.osgitech.rest.jetty** - The adapter to run the implementation with Jetty **or**\r\n* **org.eclipse.osgitech.rest.servlet.whiteboard** - An adapter to run the implementation with the OSGi Servlet Whiteboard\r\n\r\nTo use it, you will need the following bundles:\r\n\r\n* **org.eclipse.osgitech.rest** - The whiteboard implementation\r\n* **org.eclipse.osgitech.rest.config** - The whiteboard implementation default configuration, when you want to use it\r\n* **org.eclipse.osgitech.rest.sse** - An optional fragment for the use of server sent events\r\n\r\n\r\nYou will find the Release and Snapshot artifacts at Maven Central, respectively the snapshots at https://oss.sonatype.org.\r\n\r\n```\r\n\u003cdependency\u003e\r\n  \u003cgroupId\u003eorg.eclipse.osgi-technology.rest\u003c/groupId\u003e\r\n  \u003cartifactId\u003eorg.eclipse.osgitech.rest\u003c/artifactId\u003e\r\n  \u003cversion\u003e${version}\u003c/version\u003e\r\n\u003c/dependency\u003e\r\n\u003cdependency\u003e\r\n  \u003cgroupId\u003eorg.eclipse.osgi-technology.rest\u003c/groupId\u003e\r\n  \u003cartifactId\u003eorg.eclipse.osgitech.rest.config\u003c/artifactId\u003e\r\n  \u003cversion\u003e${version}\u003c/version\u003e\r\n\u003c/dependency\u003e\r\n\u003cdependency\u003e\r\n  \u003cgroupId\u003eorg.eclipse.osgi-technology.rest\u003c/groupId\u003e\r\n  \u003cartifactId\u003eorg.eclipse.osgitech.rest.sse\u003c/artifactId\u003e\r\n  \u003cversion\u003e${version}\u003c/version\u003e\r\n\u003c/dependency\u003e\r\n\u003cdependency\u003e\r\n  \u003cgroupId\u003eorg.eclipse.osgi-technology.rest\u003c/groupId\u003e\r\n  \u003cartifactId\u003eorg.eclipse.osgitech.rest.jetty\u003c/artifactId\u003e\r\n  \u003cversion\u003e${version}\u003c/version\u003e\r\n\u003c/dependency\u003e\r\n\u003cdependency\u003e\r\n  \u003cgroupId\u003eorg.eclipse.osgi-technology.rest\u003c/groupId\u003e\r\n  \u003cartifactId\u003eorg.eclipse.osgitech.rest.servlet.whiteboard\u003c/artifactId\u003e\r\n  \u003cversion\u003e${version}\u003c/version\u003e\r\n\u003c/dependency\u003e\r\n```\r\n\r\nFor those, who use Gradle:\r\n\r\n```\r\norg.eclipse.osgi-technology.rest:org.eclipse.osgitech.rest:${version}\r\norg.eclipse.osgi-technology.rest:org.eclipse.osgitech.rest.config:${version}\r\norg.eclipse.osgi-technology.rest:org.eclipse.osgitech.rest.sse:${version}\r\n```\r\n\r\n## Jetty Setup\r\n\r\nThe Jakarta REST whiteboard can use the *Eclipse Jetty*. To run a simple example you'll need:\r\n\r\n* *org.eclipse.osgitech.rest*\r\n* *org.eclipse.osgitech.rest.config* - The default configuration\r\n* *org.eclipse.osgitech.rest.jetty* - The Jetty Adapter\r\n\r\nYou can change various server setting by using the OSGi Configurator or the Configuration Admin like this:\r\n\r\n```json\r\n{\r\n  \":configurator:resource-version\": 1,\r\n  \r\n  \"JakartarsWhiteboardComponent\": \r\n  {\r\n    \"jersey.port\": 8081,\r\n    \"jersey.jakartars.whiteboard.name\" : \"demo\",\r\n    \"jersey.context.path\" : \"demo\" \r\n  }\r\n}\r\n```\r\n\r\nThis would run the server at\r\n\r\nhttp://localhost:8081/demo\r\n\r\nThe following properties are supported for configuring the Whiteboard on Jersey:\r\n\r\n| Parameter | Description | Default |\r\n| --- | --- | -- |\r\n|`jersey.schema`| The schema under which the services should be available. | http | \r\n|`jersey.host`| The host under which the services should be available. | localhost | \r\n|`jersey.port`| The port  under which the services should be available. | 8181 | \r\n|`jersey.context.path`| The base context path of the whiteboard. | /rest | \r\n|`jersey.jakartars.whiteboard.name`| The name of the whiteboard| Jersey REST | \r\n|`jersey.disable.sessions`| Enable/disable session handling in Jetty.\u003cbr\u003eDisabled by default as REST services are stateless. | `true` | \r\n\r\nThe definition of these properties is located in [JerseyConstants](https://github.com/osgi/jakartarest-osgi/blob/main/org.eclipse.osgitech.rest/src/main/java/org/eclipse/osgitech/rest/provider/JerseyConstants.java).\r\n\r\n**_Note:_**  \r\nThe default value for `jersey.context.path` is `/rest`. So if you don't configure a value via the _configurator.json_ file, your services will be available via the `rest` context path. This is also the case for a custom Jakarta-RS application. If you don't want to use a context path, you explicitly have to set it to an empty value.\r\n\r\n\r\nPlease note, that the Felix Jetty implementation runs the OSGi HTTP Service by default at port 8080. \r\n\r\n**It may come to an conflict, with the port in your configuration.** \r\n\r\nTherefore you may set the system property `org.osgi.service.http.port=-1` to deactivate the HTTP Service under port 8080.\r\n\r\n## OSGi Servlet Whiteboard Setup\r\n\r\nTo take profit from an eventually running servlet whiteboard, there is an adapter / connector the attach your Jersey Jakarta REST applications to this whiteboard.\r\n\r\nTo run this you'll need:\r\n\r\n* *org.eclipse.osgitech.rest*\r\n* *org.eclipse.osgitech.rest.servlet.whiteboard* - The OSGi Servlet Whiteboard Adapter\r\n\r\nYou can change various setting by using the OSGi Configurator or the Configuration Admin like this:\r\n\r\n```json\r\n{\r\n  \"org.apache.felix.http~demo\":\r\n  {\r\n    \"org.osgi.service.http.port\": 8081,\r\n    \"org.osgi.service.http.host\": \"localhost\",\r\n    \"org.apache.felix.http.context_path\": \"demo\",\r\n    \"org.apache.felix.http.name\": \"Demo HTTP Whiteboard\",\r\n    \"org.apache.felix.http.runtime.init.id\": \"demowb\"\r\n  },\r\n  \"JakartarsServletWhiteboardRuntimeComponent~demo\":\r\n  {\r\n    \"jersey.jakartars.whiteboard.name\" : \"Demo Jakarta REST Whiteboard\",\r\n    \"jersey.context.path\" : \"rest\",\r\n    \"osgi.http.whiteboard.target\" : \"(id=demowb)\"\r\n  }\r\n}\r\n```\r\n\r\nThis would run the Jakarta REST Whiteboard implementation at:\r\n\r\nhttp://localhost:8081/demo/rest\r\n\r\nThe first block `org.apache.felix.http~demo` is used to configure the _Apache Felix HTTP Service_ service factory. Details about the configuration options are available in the [Apache Felix HTTP Service Wiki](https://cwiki.apache.org/confluence/display/FELIX/Apache+Felix+HTTP+Service).\r\n\r\nThe second block `JakartarsServletWhiteboardRuntimeComponent~demo` is used to configure the whiteboard service factory with the Servlet Whiteboard. The following properties are supported for configuring the Whiteboard on Servlet Whiteboard:\r\n\r\n| Parameter | Description | Default |\r\n| --- | --- | -- |\r\n|`jersey.context.path`| The base context path of the whiteboard. | / | \r\n|`jersey.jakartars.whiteboard.name`| The name of the whiteboard| Jersey REST | \r\n|`osgi.http.whiteboard.target`| Service property specifying the target filter to select the Http Whiteboard implementation to process the service.\u003cbr\u003eThe value is an LDAP style filter that points to the id defined in `org.apache.felix.http.runtime.init.id`. | - | \r\n\r\nThe definition of these properties is located in [JerseyConstants](https://github.com/osgi/jakartarest-osgi/blob/main/org.eclipse.osgitech.rest/src/main/java/org/eclipse/osgitech/rest/provider/JerseyConstants.java).\r\n\r\nPlease note, that the Felix Jetty implementation runs the OSGi HTTP Service by default at port 8080. \r\n\r\n**It may come to an conflict, with the port in your configuration.** \r\n\r\nTherefore you may set the system property `org.osgi.service.http.port=-1` to deactivate the HTTP Service under port 8080.\r\n\r\n## Example Resource\r\n\r\nWhen using the Jakarta REST Whiteboard, you just have to register your REST resources and extensions as a service. There are some useful Meta-Annotations, that create component properties for you.\r\n\r\n```java\r\n@JakartarsResource\r\n@JakartarsName(\"demo\")\r\n@Component(service = DemoResource.class, scope = ServiceScope.PROTOTYPE)\r\n@Path(\"/\")\r\npublic class DemoResource {\r\n\r\n\t@GET\r\n\t@Path(\"/hello\")\r\n\tpublic String hello() {\r\n\t\treturn \"Hello World!\";\r\n\t}\r\n\r\n}\r\n```\r\n\r\n## Maven Example Archetype\r\n\r\nThe module *org.eclipse.osgitech.rest.archetype* contains a Maven template to create a sample project.\r\n\r\nTo create a sample project call:\r\n\r\n```bash\r\nmvn archetype:generate \r\n-DarchetypeGroupId=org.eclipse.osgi-technology.rest \r\n-DarchetypeArtifactId=org.eclipse.osgitech.rest.archetype \r\n-DarchetypeVersion=1.0.0-SNAPSHOT \r\n-DgroupId=\u003cyour-group-id\u003e \r\n-DartifactId=\u003cyour-artifact-id\u003e\r\n\r\n```\r\n\r\nThe generated project contains a ready to run [example](org.eclipse.osgitech.rest.archetype/src/main/resources/archetype-resources/readme.md).\r\n\r\n\r\n## Gradle Bnd Library Support\r\n\r\nWhen adding the Jakarta REST Library to you dependencies:\r\n\r\n```\r\norg.eclipse.osgi-technology.rest:org.eclipse.osgitech.rest.bnd.library:${version}\r\n```\r\n\r\nyou can simply but the instruction `-library: jakartaREST` and you will find a repository in you bnd workspace after reloading the workspace.\r\n\r\nIt brings you all dependencies, you need to run Jersey. In addition to that it also brings a dependency to:\r\n\r\n```\r\norg.eclipse.osgi-technology.rest:org.eclipse.osgitech.rest.bnd.project.library:${version}\r\n```\r\n\r\nThis library adds support for *bndrun* files. Calling the instruction `-library: enableJakartaREST` within a *bndrun* adds automatically all Jersey and Jakarta REST Whiteboard dependencies to the *runbundles* section.\r\n\r\nIf you use the library instruction within a *bnd.bnd* file, it adds the JakartaRs API to the buildpath.\r\n\r\nFurthermore this dependency brings three bndtools project templates:\r\n\r\n1. Jakarta REST Resource with a default configuration\r\n2. Jakarta REST Resource with Jetty Runtime and a corresponding configuration file\r\n3. Jakarta REST Resource with a configuration for the use with the OSGI Servlet Whiteboard\r\n\r\nAll these projects can be imported using the bndtools project wizard.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-osgi-technology%2Fjakartarest-osgi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclipse-osgi-technology%2Fjakartarest-osgi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-osgi-technology%2Fjakartarest-osgi/lists"}