Furthermore, since the token only lasts up to 12hours, it's not possible to update this token without re-launching IntelliJ.
Describe the solution you'd like
Have the IntelliJ plugin overwrite the value of CODEARTIFACT_AUTH_TOKEN with a fresh token prior to resolving maven artifacts.
Describe alternatives you've considered
Another IntelliJ plugin that attempts to solve this by writing the value of the token directly into ~/.m2/settings.xml.
https://github.com/coderazzi/aws_codeartifact_maven
Another workaround is to run mvn clean install or similar from command line to download a local copy of the dependencies. This is still painful and having a seamless integration as outlined above would be great.
Is your feature request related to a problem? Please describe. Maven requires the following configuration in
~/.m2/settings.xml
for CodeArtifact:This requires first exporting the
CODEARTIFACT_AUTH_TOKEN
like:And then launching IntelliJ.
Furthermore, since the token only lasts up to 12hours, it's not possible to update this token without re-launching IntelliJ.
Describe the solution you'd like Have the IntelliJ plugin overwrite the value of
CODEARTIFACT_AUTH_TOKEN
with a fresh token prior to resolving maven artifacts.Describe alternatives you've considered Another IntelliJ plugin that attempts to solve this by writing the value of the token directly into
~/.m2/settings.xml
. https://github.com/coderazzi/aws_codeartifact_mavenAdditional context Gracefully handle profiles configured with AWS SSO and/or MFA.