{"id":16456099,"url":"https://github.com/amitjoy/osgi-scr-graph","last_synced_at":"2026-02-18T02:02:09.362Z","repository":{"id":103153582,"uuid":"334248458","full_name":"amitjoy/osgi-scr-graph","owner":"amitjoy","description":"Prepares a Graph for OSGi Service Component Runtime (SCR)","archived":false,"fork":false,"pushed_at":"2022-02-13T13:31:02.000Z","size":5468,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-24T13:42:02.309Z","etag":null,"topics":["java","osgi","osgi-declarative-services","osgi-scr"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amitjoy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2021-01-29T19:52:55.000Z","updated_at":"2024-04-09T17:08:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"108ac616-8dc5-4af9-8c5b-cc6d89985ae2","html_url":"https://github.com/amitjoy/osgi-scr-graph","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/amitjoy/osgi-scr-graph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitjoy%2Fosgi-scr-graph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitjoy%2Fosgi-scr-graph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitjoy%2Fosgi-scr-graph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitjoy%2Fosgi-scr-graph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amitjoy","download_url":"https://codeload.github.com/amitjoy/osgi-scr-graph/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitjoy%2Fosgi-scr-graph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29566366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T00:47:08.760Z","status":"online","status_checked_at":"2026-02-18T02:00:09.468Z","response_time":162,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["java","osgi","osgi-declarative-services","osgi-scr"],"created_at":"2024-10-11T10:24:46.602Z","updated_at":"2026-02-18T02:02:09.324Z","avatar_url":"https://github.com/amitjoy.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"560\" alt=\"logo\" src=\"https://user-images.githubusercontent.com/76659596/106566061-10d28600-6530-11eb-8c3f-f2a3a579a005.png\" /\u003e\n\u003c/p\u003e\n\nThis repository comprises the API and optional Apache Felix Gogo Command to generate a DOT graph of the Service Component Runtime (SCR).\n\n----------------------------------------------------------------------------------------------------------\n[![amitjoy - osgi-scr-graph](https://img.shields.io/static/v1?label=amitjoy\u0026message=osgi-scr-graph\u0026color=blue\u0026logo=github)](https://github.com/amitjoy/osgi-scr-graph)\n[![stars - osgi-scr-graph](https://img.shields.io/github/stars/amitjoy/osgi-scr-graph?style=social)](https://github.com/amitjoy/osgi-scr-graph)\n[![forks - osgi-scr-graph](https://img.shields.io/github/forks/amitjoy/osgi-scr-graph?style=social)](https://github.com/amitjoy/osgi-scr-graph)\n[![License - Apache](https://img.shields.io/badge/License-Apache-blue)](#license)\n[![Build - Passing](https://img.shields.io/badge/Build-Passing-brightgreen)](https://github.com/amitjoy/osgi-scr-graph/runs/1485969918)\n[![GitHub release](https://img.shields.io/github/release/amitjoy/osgi-scr-graph?include_prereleases\u0026sort=semver)](https://github.com/amitjoy/osgi-scr-graph/releases/)\n-----------------------------------------------------------------------------------------------------------\n\n### Minimum Requirements\n\n1. Java 8\n2. OSGi R7\n\n-----------------------------------------------------------------------------------------------------------\n\n### Modules\n\nThis project comprises the following list of bundles - \n\n1. `in.bytehue.osgi.scr.graph` - The Service Component Runtime(SCR) Graph API and Implementation\n2. `in.bytehue.osgi.scr.graph.example` - Example project for usages\n\n---------------------------------------------------------------------------------------------------------------\n\n### Installation\n\nTo use it in the OSGi environment, you only need to install `in.bytehue.osgi.scr.graph`.\n\n--------------------------------------------------------------------------------------------------------------\n\n#### Project Import\n\n**Import as Eclipse Projects**\n\n1. Install Bndtools\n2. Import all the projects (`File -\u003e Import -\u003e General -\u003e Existing Projects into Workspace`)\n\n--------------------------------------------------------------------------------------------------------------\n\n#### Building from Source\n\nRun `./gradlew clean build` in the project root directory\n\n--------------------------------------------------------------------------------------------------------------\n\n### Developer\n\nAmit Kumar Mondal (admin@amitinside.com)\n\n--------------------------------------------------------------------------------------------------------------\n\n### Contribution [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/amitjoy/osgi-scr-graph/issues)\n\nWant to contribute? Great! Check out [Contribution Guide](https://github.com/amitjoy/osgi-scr-graph/blob/master/CONTRIBUTING.md)\n\n--------------------------------------------------------------------------------------------------------------\n\n### License\n\nThis project is licensed under Apache License Version 2.0 [![License](http://img.shields.io/badge/license-Apache-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n\n--------------------------------------------------------------------------------------------------------------\n\n### Usage\n\n--------------------------------------------------------------------------------------------------------------\n\n#### Apache Felix Gogo Command\n\n--------------------------------------------------------------------------------------------------------------\n\n\u003cb\u003eNote that\u003c/b\u003e, the command will only work if and only if Felix Gogo bundles are installed in the OSGi runtime.\n\n##### Graph Generation\n\n\u003cimg width=\"503\" alt=\"help-graph\" src=\"https://user-images.githubusercontent.com/13380182/106591064-1a6ae680-654e-11eb-9efe-a460bbdd6d6f.png\"\u003e\n\n\u003cimg width=\"522\" alt=\"gogo\" src=\"https://user-images.githubusercontent.com/13380182/106575751-b4299800-653c-11eb-8378-81012ef2554a.png\"\u003e\n\n##### Cycle Detection\n\n\u003cimg width=\"666\" alt=\"help-cycle\" src=\"https://user-images.githubusercontent.com/13380182/106591152-37071e80-654e-11eb-8e44-98a222345085.png\"\u003e\n\n\u003cimg width=\"470\" alt=\"cycle_gogo\" src=\"https://user-images.githubusercontent.com/13380182/106576234-35812a80-653d-11eb-9aaf-ac634498e263.png\"\u003e\n\n\u003cimg width=\"1131\" alt=\"plain-cycle\" src=\"https://user-images.githubusercontent.com/13380182/106585582-c5c46d00-6547-11eb-9bde-260c5d669821.png\"\u003e\n\n\u003cimg width=\"474\" alt=\"Screenshot 2021-02-02 at 12 01 20\" src=\"https://user-images.githubusercontent.com/13380182/106591300-66b62680-654e-11eb-860d-c875e872ba7f.png\"\u003e\n\n--------------------------------------------------------------------------------------------------------------\n\n#### DOT Graph\n\nCopy the DOT graph representation format to a file having an extension of `.dot` and execute the following to convert them to PNG/SVG\n\n* `dot -Tpng filename.dot -o filename.png`\n* `dot -Tsvg filename.dot -o filename.svg`\n\nTo install `dot` in your computer, please follow this [link](https://graphviz.org/download/)\n\n--------------------------------------------------------------------------------------------------------------\n\n##### SCR Runtime\n\n![graph](https://user-images.githubusercontent.com/13380182/106575825-cc99b280-653c-11eb-894d-3d4e65de88fc.png)\n\n##### Cycle Detection\n\n![cycle](https://user-images.githubusercontent.com/13380182/106576461-6cefd700-653d-11eb-83af-da80272a5fb3.png)\n\n--------------------------------------------------------------------------------------------------------------\n\n#### API Usage Examples\n\n--------------------------------------------------------------------------------------------------------------\n\n##### Graph Generation:\n\n```java\n@Component\npublic final class GraphGenrator {\n\n    @Reference\n    private ScrGraph scrGraph;\n\n    public String graph() {\n        final Graph\u003cScrComponent, DefaultEdge\u003e graph = scrGraph.getGraph();\n\n        final Writer writer = new StringWriter();\n        scrGraph.exportGraph(graph, writer);\n\n        return writer.toString();\n    }\n}\n```\n--------------------------------------------------------------------------------------------------------------\n\n##### Cycle Detection:\n\n```java\n@Component\npublic final class GraphCycleFinder {\n\n    @Reference\n    private ScrGraph scrGraph;\n\n    public String cycle() {\n        final List\u003cList\u003cScrComponent\u003e\u003e cycles = scrGraph.getCycles();\n        if (cycles.isEmpty()) {\n            return \"No SCR cycle exists\";\n        }\n        final Graph\u003cScrComponent, DefaultEdge\u003e cyclesAsGraph = scrGraph.getCyclesAsGraph();\n        final Writer writer = new StringWriter();\n        scrGraph.exportGraph(cyclesAsGraph, writer);\n\n        return writer.toString();\n    }\n\n}\n```\n--------------------------------------------------------------------------------------------------------------\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famitjoy%2Fosgi-scr-graph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famitjoy%2Fosgi-scr-graph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famitjoy%2Fosgi-scr-graph/lists"}