{"id":19174309,"url":"https://github.com/domino-osgi/domino","last_synced_at":"2025-05-07T18:20:43.838Z","repository":{"id":3245781,"uuid":"4283118","full_name":"domino-osgi/domino","owner":"domino-osgi","description":"OSGi dynamics made easy - A Scala DSL to master OSGi dynamics","archived":false,"fork":false,"pushed_at":"2021-12-23T10:43:08.000Z","size":816,"stargazers_count":54,"open_issues_count":1,"forks_count":14,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-20T01:32:59.428Z","etag":null,"topics":["dsl","library","modularity","osgi","scala"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/domino-osgi.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"lefou"}},"created_at":"2012-05-10T10:26:37.000Z","updated_at":"2024-08-27T14:33:30.000Z","dependencies_parsed_at":"2022-09-18T10:30:24.997Z","dependency_job_id":null,"html_url":"https://github.com/domino-osgi/domino","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domino-osgi%2Fdomino","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domino-osgi%2Fdomino/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domino-osgi%2Fdomino/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domino-osgi%2Fdomino/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/domino-osgi","download_url":"https://codeload.github.com/domino-osgi/domino/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252931808,"owners_count":21827169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["dsl","library","modularity","osgi","scala"],"created_at":"2024-11-09T10:17:16.172Z","updated_at":"2025-05-07T18:20:43.803Z","avatar_url":"https://github.com/domino-osgi.png","language":"Scala","funding_links":["https://github.com/sponsors/lefou"],"categories":[],"sub_categories":[],"readme":"= Domino\n:toc:\n:toc-placement: preamble\n:stable-version: 1.1.5\n:example-scala-version: 2.13.2\n\nifdef::env-github[]\nimage:https://github.com/domino-osgi/domino/actions/workflows/build.yml/badge.svg[\"Build and Test\", link=\"https://github.com/domino-osgi/domino/actions/workflows/build.yml\"]\nimage:https://www.codacy.com/project/badge/afcdfefe80494be4bf729437dc3e2a9b[\"Codacy code quality\", link=\"https://www.codacy.com/app/lefou/domino\"]\nimage:https://badge.waffle.io/domino-osgi/domino.svg?label=ready\u0026title=Ready[\"Ready Stories\", link=\"https://waffle.io/domino-osgi/domino\"]\nimage:https://badges.gitter.im/Join%20Chat.svg[\"Gitter chat\", link=\"https://gitter.im/domino-osgi/domino?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\"]\nimage:https://javadoc.io/badge2/com.github.domino-osgi/domino_2.13/javadoc.svg[\"ScalaDoc\", link=\"https://javadoc.io/doc/com.github.domino-osgi/domino_2.13\"]\nendif::[]\n\n\nDomino is a small library for the programming language http://www.scala-lang.org[Scala] designed to support developers in writing http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/BundleActivator.html[bundle activators] for the Java module system http://www.osgi.org/Technology/WhyOSGi[OSGi]. It strives to make writing complex and highly-dynamic bundle activators as easy as possible without sacrificing the power of the OSGi API.\n\nAs such, Domino is a lightweight alternative to OSGi component models like http://ipojo.org[iPOJO], http://wiki.osgi.org/wiki/Blueprint[Blueprint] and http://wiki.osgi.org/wiki/Declarative_Services[Declarative Services]. Especially for those who want to leverage the power of pure code instead of reverting to an XML- or annotation-based approach.\n\n== Features\n\nExpressive::\nDomino offers an expressive http://en.wikipedia.org/wiki/Domain-specific_language[DSL] which reflects the event-driven nature of OSGi and allows you to define very easily when your logic is made available and when it is revoked.\n// Most importantly, it let's you encapsulates the code for activating logic and for deactivating logic in one unit. It's not separated in start() and stop() method anymore. That greatly enhances the cohesion of your logic.\n\nUnrestrictive::\nSome libraries just cover the most common use cases and let you fall deeply whenever you need to do something more special.\nThen you suddenly find yourself bypassing the library completely.\nDomino tries to prevent this by staying close to the low-level OSGi API.\n// You can access the bundle context at any time. Many methods expose the underlying low-level API objects. Domino tries to scale with your needs, much like Scala.\n\nType safe::\nMost features in Domino benefit from static typing.\nThat means the compiler and your IDE can help you write correct code.\nAdditionally, there's support for using generic type parameters in the service registry.\n\nFamiliar::\nInstead of inventing a completely foreign DSL, Domino tries to use familiar Scala data types such as http://www.scala-lang.org/api/current/scala/Option.html[Option], http://www.scala-lang.org/api/current/scala/collection/immutable/List.html[List] etc. whenever possible so you can make use of those many nice methods like `filter` or `map` you probably fell in love with.\n\nExtensible::\nIf the Domino core DSL is not enough for you, simply extend it.\nDo you want to run a job as long as a certain service is available?\nSuch things can be easily integrated.\n\nComprehensive::\nMany of OSGi's core features are natively supported by the DSL (services, configuration, bundles, meta types).\n\n\n== Getting started\n\nSome lines of code often say more than 1000 words.\n\n=== Wait for service and register service\n\n[source,scala]\n----\nimport domino.DominoActivator\nimport org.osgi.service.http.HttpService\n\nclass MyService(httpService: HttpService)\n\nclass Activator extends DominoActivator {\n  whenBundleActive {\n    // Make service available as long as another\n    // service is present\n    whenServicePresent[HttpService] { httpService =\u003e\n      val myService = new MyService(httpService)\n      myService.providesService[MyService]\n    }\n  }\n}\n----\n\n=== Listen for configuration updates\n\n[source,scala]\n----\nimport domino.DominoActivator\n\nclass KeyService(key: String)\n\nclass Activator extends DominoActivator {\n  whenBundleActive {\n    // Reregister service whenever configuration changes\n    whenConfigurationActive(\"my_service\") { conf =\u003e\n      val key = conf.getOrElse(\"key\", \"defaultKey\")\n      new KeyService(key).providesService[KeyService]\n    }\n  }\n}\n----\n\nRead more in the complete link:UserGuide.adoc[Domino User Guide].\n\n== Download\n\nThe latest stable version is {stable-version} and can be downloaded from http://search.maven.org/#search|ga|1|g%3A%22com.github.domino-osgi%22[Maven Central].\n\nMaven::\n[source,xml,subs=\"attributes,verbatim\"]\n----\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.domino-osgi\u003c/groupId\u003e\n  \u003cartifactId\u003edomino_${scala.version}\u003c/artifactId\u003e\n  \u003cversion\u003e{stable-version}\u003c/version\u003e\n\u003c/dependency\u003e\n----\n\nMill::\n[source,scala,subs=\"attributes\"]\nivy\"com.github.domino-osgi::domino:{stable-version}\"\n\n\nSBT::\n[source,scala,subs=\"attributes\"]\n\"com.github.domino-osgi\" %% \"domino\" % \"{stable-version}\"\n\nGradle::\n[source,groovy,subs=\"attributes\"]\ncompile 'com.github.domino-osgi:domino_${scala.version}:{stable-version}'\n\nManual::\n[horizontal]\nScala 2.13:::\nhttp://search.maven.org/remotecontent?filepath=com/github/domino-osgi/domino_2.13/{stable-version}/domino_2.13-{stable-version}.jar[domino_2.13-{stable-version}.jar],\nhttp://search.maven.org/remotecontent?filepath=com/github/domino-osgi/domino_2.13/{stable-version}/domino_2.13-{stable-version}-sources.jar[domino_2.13-{stable-version}-sources.jar],\nhttp://search.maven.org/remotecontent?filepath=com/github/domino-osgi/domino_2.13/{stable-version}/domino_2.13-{stable-version}-javadoc.jar[domino_2.13-{stable-version}-scaladoc.jar]\nScala 2.12:::\nhttp://search.maven.org/remotecontent?filepath=com/github/domino-osgi/domino_2.12/{stable-version}/domino_2.12-{stable-version}.jar[domino_2.12-{stable-version}.jar],\nhttp://search.maven.org/remotecontent?filepath=com/github/domino-osgi/domino_2.12/{stable-version}/domino_2.12-{stable-version}-sources.jar[domino_2.12-{stable-version}-sources.jar],\nhttp://search.maven.org/remotecontent?filepath=com/github/domino-osgi/domino_2.12/{stable-version}/domino_2.12-{stable-version}-javadoc.jar[domino_2.12-{stable-version}-scaladoc.jar]\nScala 2.11:::\nhttp://search.maven.org/remotecontent?filepath=com/github/domino-osgi/domino_2.11/{stable-version}/domino_2.11-{stable-version}.jar[domino_2.11-{stable-version}.jar],\nhttp://search.maven.org/remotecontent?filepath=com/github/domino-osgi/domino_2.11/{stable-version}/domino_2.11-{stable-version}-sources.jar[domino_2.11-{stable-version}-sources.jar],\nhttp://search.maven.org/remotecontent?filepath=com/github/domino-osgi/domino_2.11/{stable-version}/domino_2.11-{stable-version}-javadoc.jar[domino_2.11-{stable-version}-scaladoc.jar]\nScala 2.10:::\nhttp://search.maven.org/remotecontent?filepath=com/github/domino-osgi/domino_2.10/{stable-version}/domino_2.10-{stable-version}.jar[domino_2.10-{stable-version}.jar],\nhttp://search.maven.org/remotecontent?filepath=com/github/domino-osgi/domino_2.10/{stable-version}/domino_2.10-{stable-version}-sources.jar[domino_2.10-{stable-version}-sources.jar],\nhttp://search.maven.org/remotecontent?filepath=com/github/domino-osgi/domino_2.10/{stable-version}/domino_2.10-{stable-version}-javadoc.jar[domino_2.10-{stable-version}-scaladoc.jar]\n\n\n== Documentation\n\n* link:UserGuide.adoc[User Guide]\n* ScalaDoc hosted on https://javadoc.io/doc/com.github.domino-osgi/domino_2.13[javadoc.io]\n* https://domino-osgi.github.io/domino/scaladoc/1.0.0_2.10[Scaladoc (1.0.0)]\n* link:FAQ.adoc[FAQ]\n* https://gitter.im/domino-osgi/domino[Gitter chat]\n\n== Development\n\n=== Contribute\n\nIf you want to report a bug or suggest a feature, please do it in the https://github.com/domino-osgi/domino/issues[GitHub issues section].\n\nIf you want to provide a fix or improvement, please fork Domino and send us a pull request on https://github.com/domino-osgi/domino[GitHub]. Thank you!\n\nIf you want to give general feedback, please do it in the https://gitter.im/domino-osgi/domino[Gitter chat].\n\nIf you want to show appreciation for the project, please \"star\" it on https://github.com/domino-osgi/domino[GitHub]. That helps us setting our priorities.\n\n\n=== Building Domino\n\nDomino is build with the https://github.com/lihaoyi/mill[Mill build tool].\n\nTo cleanly build domino (for Scala {example-scala-version}), you can use the bundles start script or your locally installed mill executable:\n\n[subs=\"attributes\"]\n----\n./mill domino[{example-scala-version}].jar\n----\n\n=== Creating a Release\n\n* Bump version in `build.sc` file\n* Update Changelog\n* Review documentation\n* Create a git tag with the version\n* Upload the release artifacts up to Maven Central\n\n==== Deploy to Maven Central / Sonatype Open Source Respository (OSSRH)\n\n----\n./mill mill.scalalib.PublishModule/publishAll \\\n  --release true \\\n  --signed true \\\n  --publishArtifacts __.publishArtifacts \\\n  --sonatypeCreds \u003cYourSonatypeCreds\u003e\n----\n\n== Credits\n\nThanks to ...\n\n* https://github.com/helgoboss[helgoboss] for creating Domino 1.0.0\n* http://github.com/weiglewilczek/scalamodules[ScalaModules] for being an inspiration, in particular for the bundle and service watching functionality\n* http://commons.wikimedia.org/wiki/User:Nyenyec[Nyenyec] for creating the image from which the Domino logo is derived\n\n== License\n\nDomino is licensed under the http://www.opensource.org/licenses/mit-license[MIT License].\n\n== Changelog\n\n=== Domino 1.1.5 - 2020-05-05\n\n* Fixed Maven Central packaging\n\n=== Domino 1.1.4 - 2020-05-05\n\n* Support for Scala 2.13\n* Bumped supported Scala versions to latest releases\n* Added option to log currently unsatisfied service watchers\n\n=== Domino 1.1.3 - 2018-10-01\n\n* Log un-/regististration of services\n* Log registrations of service trackers\n\n\n=== Domino 1.1.2 - 2017-04-28\n\n* Support for Scala 2.12\n* More test cases\n\n=== Domino 1.1.1 - 2016-02-03\n\n* Removed `Logging` trait from `DominoActivator`. You can restore the old behavior be mixing in the trait into your activator class.\n* Improved test suite and implemented more tests.\n  Now we use PojoSR to test OSGi dynamics without the need to run a separate container.\n* Fixed naming issues for service provisioning and comsumption.\n* Fixed unnecessary re-configuration issues with `whenConfigurationActive` and `whenFactoryConfigurationActive`.\n\n=== Domino 1.1.0 - 2015-05-28\n\n* Switched Maintainer to Tobias Roeser\n* Renamed base package from `org.helgoboss.domino` to `domino`\n* Embedded former dependencies (`org.helgoboss.capsule`, `org.helgoboss.scala-osgi-metatype`, `org.helgoboss.scala-logging`) as sub packages\n* Switched to Polyglot Scala extension for Maven 3.3\n* Cross-Release for Scala 2.10 and 2.11\n\n=== Domino 1.0.0 - 2013-03-31\n\n* Initial release for Scala 2.10\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdomino-osgi%2Fdomino","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdomino-osgi%2Fdomino","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdomino-osgi%2Fdomino/lists"}