{"id":19248973,"url":"https://github.com/sbt/sbt-osgi","last_synced_at":"2025-04-06T04:15:05.929Z","repository":{"id":5170247,"uuid":"6341879","full_name":"sbt/sbt-osgi","owner":"sbt","description":"sbt plugin for creating OSGi bundles","archived":false,"fork":false,"pushed_at":"2025-03-10T09:24:23.000Z","size":389,"stargazers_count":47,"open_issues_count":24,"forks_count":43,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-03-30T03:08:57.476Z","etag":null,"topics":["osgi","sbt","sbt-plugin"],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"firegento/firegento-pdf","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sbt.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}},"created_at":"2012-10-22T20:31:46.000Z","updated_at":"2025-03-10T09:24:27.000Z","dependencies_parsed_at":"2023-10-20T15:28:01.295Z","dependency_job_id":"e7d2947c-57cc-4763-bd09-e2bd51d88a4c","html_url":"https://github.com/sbt/sbt-osgi","commit_stats":{"total_commits":218,"total_committers":30,"mean_commits":7.266666666666667,"dds":0.8302752293577982,"last_synced_commit":"e207604f450c9dd5f4cdb38715cbb566ca792758"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbt%2Fsbt-osgi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbt%2Fsbt-osgi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbt%2Fsbt-osgi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbt%2Fsbt-osgi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbt","download_url":"https://codeload.github.com/sbt/sbt-osgi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247430963,"owners_count":20937875,"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":["osgi","sbt","sbt-plugin"],"created_at":"2024-11-09T18:11:49.614Z","updated_at":"2025-04-06T04:15:05.909Z","avatar_url":"https://github.com/sbt.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"sbt-osgi\n========\n\n[![Build Status](https://github.com/sbt/sbt-osgi/actions/workflows/ci.yml/badge.svg)](https://github.com/sbt/sbt-osgi/actions/workflows/ci.yml)\n\nPlugin for [sbt](http://www.scala-sbt.org) to create [OSGi](http://www.osgi.org/) bundles.\n\nInstalling sbt-osgi\n-------------------\n\nsbt-osgi is a plugin for sbt. In order to install sbt, please refer to the sbt [1.x](https://www.scala-sbt.org/1.x/docs/Setup.html)). Please make sure that you are using a suitable version of sbt:\n\n- sbt-osgi 0.9.{4-x} -\u003e sbt 1.6.2+ (older versions of sbt may work but 1.6.2+ supports all JDK LTS versions)\n\nAs sbt-osgi is a plugin for sbt, it is installed like any other sbt plugin, that is by mere configuration: just add sbt-osgi to your global or local plugin definition. Global plugins are defined in `~/.sbt/\u003cSBT_VERSION\u003e/plugins/plugins.sbt` and local plugins are defined in `project/plugins.sbt` in your project.\n\nIn order to add sbt-osgi as a plugin, just add the below setting to the relevant plugin definition, paying attention to blank lines between settings:\n\n```sbt\n// Other stuff\n\naddSbtPlugin(\"com.github.sbt\" % \"sbt-osgi\" % \"0.9.11\")\n```\n\nIf you want to use the latest and greatest features, you can instead have sbt depend on and locally build the current source snapshot by adding the following to your plugin definition file.\nExample `\u003cPROJECT_ROOT\u003e/project/plugins.sbt`:\n```sbt\nlazy val plugins = (project in file(\".\"))\n  .dependsOn(sbtOsgi)\n\n// Other stuff\n\ndef sbtOsgi = uri(\"git://github.com/sbt/sbt-osgi.git\")\n```\n\nUsing sbt-osgi\n---------------\n\n#### Version 0.8.0 and above\nAs, since version `0.8.0`, sbt-osgi uses the sbt 0.13.5 *Autoplugin* feature, it can be enabled for individual projects like any other sbt Autoplugin. For more information on enabling and disabling plugins, refer to the [sbt plugins tutorial](http://www.scala-sbt.org/release/tutorial/Using-Plugins.html#Enabling+and+disabling+auto+plugins).\n\nExample `\u003cPROJECT_ROOT\u003e/build.sbt`:\n\n```sbt\nenablePlugins(SbtOsgi)\n```\n\nTo also override the default publish behaviour, also add the `osgiSettings` settings to your project via your preferred method.\n\nExample `\u003cPROJECT_ROOT\u003e/build.sbt`:\n\n```sbt\n// Other settings\n\nosgiSettings\n```\n\n#### Version 0.7.0 and below\nAdd the below line to your sbt build definition, which adds the task `osgiBundle` which creates an OSGi bundle for your project and also changes the `publish` task to publish an OSGi bundle instead of a raw JAR archive. Again, pay attention to the blank line between settings:\n\n```sbt\n// Other stuff\n\nosgiSettings\n```\n\nIf you just want `osgiBundle`, i.e. don't want to change the behavior of `publish`:\n\n\n```\n// Other stuff\n\ndefaultOsgiSettings\n```\n\nSettings\n--------\n\nsbt-osgi can be configured with the following settings:\n\n- `bundleActivator`: value for `Bundle-Activator` header, default is `None`\n- `bundleRequiredExecutionEnvironment`: value for `Bundle-RequiredExecutionEnvironment` header, default is an empty string.\n- `bundleSymbolicName`: value for `Bundle-SymbolicName` header, default is `organization` plus `name`\n- `bundleVersion`: value for `Bundle-Version` header, default is `version`\n- `dynamicImportPackage`: values for `Dynamic-ImportPackage` header, default is the empty sequence\n- `exportPackage`: values for `Export-Package` header, default is the empty sequence\n- `importPackage`: values for `Import-Package` header, default is `*`\n- `fragmentHost`: value for `Fragment-Host` header, default is `None`\n- `privatePackage`: values for `Private-Package` header, default is `OsgiKeys.bundleSymbolicName` plus `.*`\n- `requireBundle`: values for `Require-Bundle` header, default is the empty sequence\n- `additionalHeaders`: map of additional headers to be passed to BND, default is the empty sequence\n- `embeddedJars`: list of dependencies to embed inside the bundle which are automatically added to `Bundle-Classpath`\n- `explodedJars`: list of jarfiles to explode into the bundle\n- `requireCapability`: value for `Require-Capability` header, defaults to `osgi.ee;filter:=\"(\u0026(osgi.ee=JavaSE)(version=*PROJECT JAVAC VERSION*))\"`\n- `failOnUndecidedPackage`: allows failing the build when a package is neither exported nor private (instead of silently dropping it), `false` by default to be compatible with previous behaviour \n\nExample `build.sbt`:\n\n```sbt\norganization := \"com.github.sbt\"\n\nname := \"osgi.demo\"\n\nversion := \"1.0.0\"\n\nenablePlugins(SbtOsgi)\n\nlibraryDependencies += \"org.osgi\" % \"org.osgi.core\" % \"4.3.0\" % \"provided\"\n\nosgiSettings\n\nOsgiKeys.exportPackage := Seq(\"com.github.sbt.osgidemo\")\n\nOsgiKeys.bundleActivator := Option(\"com.github.sbt.osgidemo.internal.Activator\")\n```\n\nLicense\n-------\n\nThis code is open source software licensed under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbt%2Fsbt-osgi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbt%2Fsbt-osgi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbt%2Fsbt-osgi/lists"}