I created AWS CodeArtifact repository, obtained token with aws codeartifact get-authorization-token command, and set it correctly to .m2/settings.xml
aws codeartifact get-authorization-token
.m2/settings.xml