{"id":19269560,"url":"https://github.com/status-im/go-maven-resolver","last_synced_at":"2025-04-21T20:32:58.598Z","repository":{"id":47070602,"uuid":"265888978","full_name":"status-im/go-maven-resolver","owner":"status-im","description":"Tool for resolving Java Maven dependencies","archived":false,"fork":false,"pushed_at":"2024-01-21T05:05:53.000Z","size":73,"stargazers_count":15,"open_issues_count":1,"forks_count":8,"subscribers_count":54,"default_branch":"master","last_synced_at":"2024-06-19T02:11:04.940Z","etag":null,"topics":["golang","gradle","java-maven","maven","maven-resolver","nix"],"latest_commit_sha":null,"homepage":"","language":"Go","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/status-im.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}},"created_at":"2020-05-21T15:48:59.000Z","updated_at":"2024-04-02T13:53:03.000Z","dependencies_parsed_at":"2024-01-21T05:22:18.262Z","dependency_job_id":"4881a857-e543-4b5e-89dd-dae9f14bb66a","html_url":"https://github.com/status-im/go-maven-resolver","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/status-im%2Fgo-maven-resolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/status-im%2Fgo-maven-resolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/status-im%2Fgo-maven-resolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/status-im%2Fgo-maven-resolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/status-im","download_url":"https://codeload.github.com/status-im/go-maven-resolver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223877720,"owners_count":17218614,"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":["golang","gradle","java-maven","maven","maven-resolver","nix"],"created_at":"2024-11-09T20:20:32.236Z","updated_at":"2024-11-09T20:20:32.821Z","avatar_url":"https://github.com/status-im.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Description\n\nThis tool takes a names of a Java packages and returns the URLs of POMs for all its dependencies.\n\n# Usage\n\nIn basic terms the tool takes Maven formatted package names via `STDIN` and outputs URLs for all dependencies via `STDOUT`:\n```\n $ echo commons-io:commons-io:2.4 | ./go-maven-resolver\nhttps://repo.maven.apache.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.pom\nhttps://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/25/commons-parent-25.pom\nhttps://repo.maven.apache.org/maven2/org/apache/apache/9/apache-9.pom\n```\nThe package name takes the Maven format: `\u003cgroupId\u003e:\u003cartifactId\u003e:\u003cversion\u003e`\n\nThere's also a few flags available:\n```\nUsage of ./go-maven-resolver:\n  -exitCode\n    \tSet exit code on any resolving failures. (default true)\n  -ignoreOptional\n    \tIgnore optional dependencies. (default true)\n  -ignoreScopes string\n    \tScopes to ignore. (default \"provided,system,test\")\n  -recursive\n    \tShould recursive resolution be done (default true)\n  -reposFile string\n    \tPath file with repo URLs to check.\n  -retries int\n    \tHTTP request retries on non-404 codes. (default 2)\n  -timeout int\n    \tHTTP request timeout in seconds. (default 2)\n  -workers int\n    \tNumber of fetching workers. (default 50)\n```\n\n# Details\n\nThe way this works is, for each given package name:\n\n1. Iterates through a list of Maven repositories\n2. Finds and downloads the POM for the given package\n2. Analyzes the POM to find its dependencies\n3. Repeats the process recursively until all POMs are found\n\nThe fetching is done by a pool of workers to avoid running out of sockets.\n\n# Reasoning\n\nI've decided to write this because I could not find a way to achieve the same thing using Gradle or Maven.\nUsing commands like `mvn dependency:list` or `mvn help:effective-pom` is too slow and give hard to parse output. It also attempts to download all of the necessary JARs and POMs which is unnecessary.\n\nThis is used to generate data for managing dependencies for a Gradle project via [Nix package manager](https://nixos.org/nix/) in our [status-mobile](https://github.com/status-im/status-mobile/tree/develop/nix/deps/gradle) repo.\n\nFor more details see [this Gradle Forum post](https://discuss.gradle.org/t/how-to-get-full-list-of-dependencies-and-their-meta/35825).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatus-im%2Fgo-maven-resolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstatus-im%2Fgo-maven-resolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatus-im%2Fgo-maven-resolver/lists"}