@@ -86,12 +86,13 @@ that take 95% of dependencies from Maven Central and left 5% from corporate Code
8686Come companies opt in to store all dependencies in CodeArtifact with Maven Central as an _upstream_.
8787In this configuration you would want to set `settings-pluginRepositories` and `settings-repositories` to empty string `""`
8888
89- # # settings.xml for local development
89+ # # Local development
9090
9191Under the hood, this action generates a [settings.xml](./ci.settings.xml) file with CodeArtifact repository and credentials.
9292Note :
93- - maven central and its mirror are used as primary and secondary repositories for dependencies and plugins, your company CodeArtifact is in 3rd place
94- - your company repository id has format `{aws-codeartifact-domain}-{aws-codeartifact-repository}`
93+ - maven central and its mirror are used as primary and secondary repositories for dependencies and plugins, your company CodeArtifact is in 3rd place.
94+ If you use CodeArtifact upstream feature, feel free to remove maven central and its mirror from `repositories` and `pluginRepositories` sections
95+ - your company repository id has format `{aws-codeartifact-domain}-{aws-codeartifact-repository}` like `mycompany-maven`
9596
9697With this knowledge, you can place a local version of [settings.xml](./local.settings.xml) on developers' machines
9798to give them read-only access to maven packages in corporate CodeArtifact.
@@ -101,7 +102,9 @@ Host is fixed (after you create CodeArtifact domain), you can place these two li
101102export AWS_ACCOUNT_DIST=123456789012
102103export ARTIFACT_STORE_HOST="mycompany-$AWS_ACCOUNT_DIST.d.codeartifact.us-east-1.amazonaws.com"
103104` ` `
104- For `ARTIFACT_STORE_TOKEN` you'd need to generate it (at most) once a day with command like this :
105+ CodeArtifact token is _NOT_ long living, max lifetime is 12 hours.
106+ So if you need to resolve new maven dependencies on local dev machine,
107+ you'd need to regenerate `ARTIFACT_STORE_TOKEN` (at most once a day) with command like this :
105108` ` ` shell
106109TOKEN=$(aws codeartifact get-authorization-token --domain mycompany --query authorizationToken --output text)
107110export ARTIFACT_STORE_TOKEN=$TOKEN
0 commit comments