{"id":19738949,"url":"https://github.com/fpopic/sbt-ssh-git-proto-deployment-poc","last_synced_at":"2026-04-17T03:35:11.033Z","repository":{"id":71942399,"uuid":"155380634","full_name":"fpopic/sbt-ssh-git-proto-deployment-poc","owner":"fpopic","description":"(PoC) This repository is consuming some examples of protobuf files from another repository. ","archived":false,"fork":false,"pushed_at":"2020-07-29T07:01:47.000Z","size":25,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T05:58:47.655Z","etag":null,"topics":["dependency","git","protocol-buffers","sbt","sbt-protoc","scalapb"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fpopic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-10-30T12:21:23.000Z","updated_at":"2020-07-29T07:01:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"e10ab0d3-9d4d-4d27-a4b0-d39a8f0cc77c","html_url":"https://github.com/fpopic/sbt-ssh-git-proto-deployment-poc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fpopic/sbt-ssh-git-proto-deployment-poc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpopic%2Fsbt-ssh-git-proto-deployment-poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpopic%2Fsbt-ssh-git-proto-deployment-poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpopic%2Fsbt-ssh-git-proto-deployment-poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpopic%2Fsbt-ssh-git-proto-deployment-poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fpopic","download_url":"https://codeload.github.com/fpopic/sbt-ssh-git-proto-deployment-poc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpopic%2Fsbt-ssh-git-proto-deployment-poc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31913761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"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":["dependency","git","protocol-buffers","sbt","sbt-protoc","scalapb"],"created_at":"2024-11-12T01:15:47.309Z","updated_at":"2026-04-17T03:35:11.014Z","avatar_url":"https://github.com/fpopic.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"### sbt-ssh-git-proto-deployment-PoC\n\nThis is a Proof of Concept project that demonstrates how to compile protobuf file\nthat depends on another external protobuf file that lives in another [git repository](https://github.com/fpopic/github-repo-hosting-protobuf).\n\n#### 1. Requirements:\n1.  [sbt](https://www.scala-sbt.org/download.html)\n2.  [sbt-protoc plugin](project/protoc.sbt) to compile .proto files to .java .scala classes\n3.  SSH key (in `~/.ssh/`) to access private git repository\n\n#### 2. Set build.sbt\n-   If you need to reference a sbt sub-project from the github repository:\n    ```scala\n    lazy val sbtProjectFromOtherGitRepo = ProjectRef(\n      build = uri(\"ssh://git@github.com/\u003cuser\u003e/\u003crepo\u003e.git#\u003cbranch|commit|tag\u003e\"),\n      project = \"sub-project\"\n    )\n    ```\n-   Else just specify github repository:\n    ```scala\n    lazy val projectFromOtherGitRepo = RootProject(\n      build = uri(\"ssh://git@github.com/\u003cuser\u003e/\u003crepo\u003e.git#\u003cbranch|commit|tag\u003e\")\n    )\n    ```\nDependency projects will be cloned/checkouted to:  `~/.sbt/\u003csbt version\u003e/staging/\u003csha\u003e/\u003crepo\u003e/`\n\n-   Then using `sbt-protoc` specify location of .proto files from project dependency:\n    ```scala\n    PB.protoSources in Compile ++= Seq(\n      baseDirectory.in(projectFromOtherGitRepo).value / \"path/to/folder/where/protos/are\"\n    )\n    ```\n    \n#### 3. Run:\n1. ```git clone git@github.com:fpopic/sbt-ssh-git-proto-deployment-poc.git```\n2. ```cd sbt-ssh-git-proto-deployment-poc```\n2. ```sbt```\n3. ```compile```\n\n\n#### 4. Notes:\nExternal projects that the current project depends on (`RootProject`) are not getting updated using `sbt update` command after they have been changed in git, \n(that's reason why it's always better to hardcode \"immutable\" commit/tag version of the dependency than just specifying the repository name), so if a dependend project changes sbt won't reupdate the source code of the dependency\n\n- Workaround is to delete sbt staging folder before update so the project will always clone from git\n    ```bash\n    rm -r ~/.sbt/\u003csbt version\u003e/staging/\n    sbt update \n    ```\n    You can maybe create a sbt external task and name it [cleanStagingAndUpdate](https://groups.google.com/forum/#!topic/simple-build-tool/YJnUNSjrU6Q)\n\n- Or use sbt for downloading git repos and then ```publishLocal```  to get .jar and add jar to ```libraryDependencies``` instead of `dependsOn(project)`\n    - https://github.com/sbt/sbt/issues/1284\n    - https://stackoverflow.com/questions/22432666/how-can-sbt-project-import-library-from-github-cloned-to-local-directory\n\nThis PoC is made for CI automatization (Jenkins) for deploying proto files to maven repository (every time cloning from scratch)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffpopic%2Fsbt-ssh-git-proto-deployment-poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffpopic%2Fsbt-ssh-git-proto-deployment-poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffpopic%2Fsbt-ssh-git-proto-deployment-poc/lists"}