{"id":18764940,"url":"https://github.com/indyaah/codeartifact-maven-extension","last_synced_at":"2025-11-05T23:02:11.403Z","repository":{"id":42621864,"uuid":"467736288","full_name":"indyaah/codeartifact-maven-extension","owner":"indyaah","description":"Maven extension to auto-inject CodeArtifact tokens into build","archived":false,"fork":false,"pushed_at":"2024-03-23T02:04:24.000Z","size":33,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T05:12:10.728Z","etag":null,"topics":["build-tool","codeartifact","maven","maven-extension"],"latest_commit_sha":null,"homepage":"","language":"Java","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/indyaah.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":"2022-03-09T01:32:59.000Z","updated_at":"2022-11-27T00:23:06.000Z","dependencies_parsed_at":"2024-03-20T04:29:00.243Z","dependency_job_id":"9a251676-ee3a-4884-babe-3c52e5800def","html_url":"https://github.com/indyaah/codeartifact-maven-extension","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/indyaah/codeartifact-maven-extension","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indyaah%2Fcodeartifact-maven-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indyaah%2Fcodeartifact-maven-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indyaah%2Fcodeartifact-maven-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indyaah%2Fcodeartifact-maven-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/indyaah","download_url":"https://codeload.github.com/indyaah/codeartifact-maven-extension/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indyaah%2Fcodeartifact-maven-extension/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262188396,"owners_count":23272341,"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":["build-tool","codeartifact","maven","maven-extension"],"created_at":"2024-11-07T18:32:11.555Z","updated_at":"2025-11-05T23:02:06.367Z","avatar_url":"https://github.com/indyaah.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# codeartifact-maven-extension\n\n## Problem Statement\n\nCurrent [recommended flow](https://docs.aws.amazon.com/codeartifact/latest/ug/maven-mvn.html) for\nusing CodeArtifact as maven repository is to export authentication token into your environment and\nuse that environment variable as part of user setting.xml (generally at `$M2_HOME/settings.xml`)\n\nThis creates a couple of problems;\n\n1. Engineers have to keep exporting the token into their environment every 12 hours.\n2. IDEs (at least IntelliJ) cant resolve maven dependency and keep showing annoying pop-up.\n\n## Solution\n\nThe goal of this extension is to allow\ninjecting [CodeArtifact Auth token](https://docs.aws.amazon.com/codeartifact/latest/ug/tokens-authentication.html)\ninto maven reactor and override values coming from `$M2_HOME/settings.xml`.\n\n## Notes\n\nThe implementation is (intentionally) quite brittle and simple.\n\nWhen `MavenExecutionRequest` is fired in the build reactor; we intercept it and generate a token\nusing AWS java SDK. For doing that we rely on following system properties;\n\n1. `CODEARTIFACT_USERNAME` defaults to `aws`\n2. `CODEARTIFACT_DOMAIN` defaults to domain derived from CodeArtifact URL. e.g. if URL is https://my_domain-111122223333.d.codeartifact.us-west-2.amazonaws.com/maven/my_repo/ domain is derived as `my_domain`\n3. `CODEARTIFACT_OWNER` defaults to account id derived from CodeArtifact URL.  e.g. if URL is https://my_domain-111122223333.d.codeartifact.us-west-2.amazonaws.com/maven/my_repo/ owner is derived as `111122223333`\n\nThe extension will generate a token for given code artifact domain and owner (account id). Any\nservers in the reactor that are using `CODEARTIFACT_USERNAME`'s value as username would have their\npassword overridden dynamically with the geneated token value.\n\nAll system properties could be passed from `\u003cproperties\u003e` block in your root pom.xml or via CLI (\ne.g `-DCODEARTIFACT_DOMAIN=\"xxx`)\n\nThe underlying AWS client uses default provider chain, which will allow you to override AWS profile\nbeing used by passing in `-Daws.profile` property (or setting `AWS_PROFILE` env var)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findyaah%2Fcodeartifact-maven-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Findyaah%2Fcodeartifact-maven-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findyaah%2Fcodeartifact-maven-extension/lists"}