{"id":18580172,"url":"https://github.com/brcolow/codeartifact-maven-extension","last_synced_at":"2026-05-17T18:12:34.679Z","repository":{"id":85823096,"uuid":"485951332","full_name":"brcolow/codeartifact-maven-extension","owner":"brcolow","description":"Automatically retrieves a CodeArtifact authentication token and uses it to properly configure your remote repository to use your Codeartifact repository.","archived":false,"fork":false,"pushed_at":"2024-03-25T10:12:10.000Z","size":32,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-17T15:52:31.105Z","etag":null,"topics":["aws","codeartifact","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/brcolow.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-04-26T21:21:41.000Z","updated_at":"2024-03-31T14:25:46.000Z","dependencies_parsed_at":"2024-03-25T02:27:50.378Z","dependency_job_id":"f3891d02-fd9c-43be-a8e4-358ecae38a40","html_url":"https://github.com/brcolow/codeartifact-maven-extension","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brcolow%2Fcodeartifact-maven-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brcolow%2Fcodeartifact-maven-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brcolow%2Fcodeartifact-maven-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brcolow%2Fcodeartifact-maven-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brcolow","download_url":"https://codeload.github.com/brcolow/codeartifact-maven-extension/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254459119,"owners_count":22074605,"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":["aws","codeartifact","maven-extension"],"created_at":"2024-11-06T23:44:32.875Z","updated_at":"2026-05-17T18:12:34.674Z","avatar_url":"https://github.com/brcolow.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Extension Purpose\n\nAutomatically retrieves a CodeArtifact authorization token, discovers the repository endpoint, and configures Maven to\nuse your CodeArtifact repository for dependency resolution and publishing.\n\nThis exists because AWS's documented Maven flow still requires fetching and refreshing a temporary CodeArtifact auth\ntoken outside Maven.\n\n## Compatibility\n\nThis project builds against Maven 3.9.14 APIs and targets Java 11 bytecode. The included Maven Wrapper is also pinned\nto Maven 3.9.14.\n\n## Intended Behavior\n\nBy default, this extension uses the \"CodeArtifact is the source of truth\" workflow:\n\n* it discovers the configured CodeArtifact Maven repository endpoint\n* it fetches a fresh authorization token for that repository\n* it points dependency and plugin resolution at that repository\n* it configures a `central` mirror so Maven Central is reached through CodeArtifact\n\nSet `codeartifact.sourceOfTruth=false` if you want Maven Central and your other configured repositories to continue\nresolving directly. In that mode, the extension adds the authenticated CodeArtifact repository to the existing\ndependency and plugin repositories without configuring a Maven Central mirror.\n\nIf `codeartifact.prune=true` is enabled, the extension also deletes unlisted package versions from the configured\nrepository after the Maven session finishes.\n\n## CodeArtifact Setup for Maven\n\nCreate a CodeArtifact domain and a Maven repository inside it. AWS documents that flow here:\n\n* [Create a repository in CodeArtifact](https://docs.aws.amazon.com/codeartifact/latest/ug/create-repo.html#create-repo-console)\n* [Add an upstream repository](https://docs.aws.amazon.com/codeartifact/latest/ug/repo-upstream-add-console.html)\n\nIf you want CodeArtifact to proxy Maven Central, add `maven-central-store` as an upstream repository.\n\n## Add Extension to `pom.xml`\n\nAdd the extension to your project:\n\n```pom\n\u003cbuild\u003e\n  \u003cextensions\u003e\n    \u003cextension\u003e\n      \u003cgroupId\u003eio.github.brcolow\u003c/groupId\u003e\n      \u003cartifactId\u003ecodeartifact-maven-extension\u003c/artifactId\u003e\n      \u003cversion\u003e0.0.6\u003c/version\u003e\n    \u003c/extension\u003e\n  \u003c/extensions\u003e\n\u003c/build\u003e\n```\n\n## AWS Authentication\n\nBy default, the extension uses the AWS SDK for Java default credential chain.\n\nIf you want to force a specific shared credentials profile for this extension, set `codeartifact.profile`:\n\n```pom\n\u003cproperties\u003e\n  \u003ccodeartifact.profile\u003ecodeartifact\u003c/codeartifact.profile\u003e\n\u003c/properties\u003e\n```\n\n## Extension Configuration\n\nExtensions cannot use a plugin-style `\u003cconfiguration\u003e` block, so this extension is configured with project properties.\n\nRequired properties:\n\n* `codeartifact.domain`\n* `codeartifact.domainOwner`\n* `codeartifact.repository`\n\nOptional properties:\n\n* `codeartifact.durationSeconds`\n  Default: `43200`\n  Valid values: `0`, or any value from `900` to `43200`\n  `0` is primarily useful when you are using assumed-role credentials and want the token lifetime to track the\n  remaining session duration.\n* `codeartifact.profile`\n  Optional override for the shared AWS profile to use. If omitted, the AWS default credential chain is used.\n* `codeartifact.sourceOfTruth`\n  Default: `true`\n  If `false`, the extension keeps existing dependency and plugin repositories, adds the authenticated CodeArtifact\n  repository, and does not configure Maven Central to mirror through CodeArtifact.\n* `codeartifact.prune`\n  Default: `false`\n  If `true`, the extension deletes unlisted package versions from the configured CodeArtifact repository after the\n  Maven session ends.\n\nThe extension fails fast when required properties are missing or when `codeartifact.durationSeconds` or\n`codeartifact.sourceOfTruth` is invalid.\n\n### Example Configuration\n\n```pom\n\u003cproperties\u003e\n  \u003ccodeartifact.domain\u003emyDomain\u003c/codeartifact.domain\u003e\n  \u003ccodeartifact.domainOwner\u003e123456789123\u003c/codeartifact.domainOwner\u003e\n  \u003ccodeartifact.repository\u003emyRepo\u003c/codeartifact.repository\u003e\n  \u003ccodeartifact.durationSeconds\u003e3600\u003c/codeartifact.durationSeconds\u003e\n\u003c/properties\u003e\n```\n\n## Known Issues\n\nCodeArtifact sometimes reports that it cannot upload a checksum file. This is a known CodeArtifact issue:\n\n* [Maven fails to upload maven-metadata.xml checksum](https://repost.aws/questions/QUPTjhfj0cSYqEk7TgZJRKnw/maven-fails-to-upload-maven-metadata-xml-checksum)\n\nThe recommended workaround is to add Maven property `-Daether.checksums.algorithms=MD5` when deploying to the\nCodeArtifact repository.\n\n## Development\n\nRun the test suite with:\n\n```shell\n./mvnw test\n```\n\n## Publish New Release\n\n```shell\n./mvnw versions:set -DnewVersion=0.0.6\n./mvnw release:clean release:prepare\n./mvnw release:perform\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrcolow%2Fcodeartifact-maven-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrcolow%2Fcodeartifact-maven-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrcolow%2Fcodeartifact-maven-extension/lists"}