Problem with aws CodeArtifacts


Hi, I created an artifact and stored in AWS CodeArtifact.  I added the repository in my build.gradle, including the security configuration, and IntelliJ is not recognizing the packages and clases inside the new artifact.  I applied all the suggestions described in this post, but I still having same problem.  Additionally, when I build the project using gradlew script directly by command line, every thing works fine.

Could you give me a light?

评论操作 固定链接

>IntelliJ is not recognizing the packages and clases inside the new artifact.

Do you see the jar for this artifact set up as a dependency for the module in which you use it (see it in File | Project Structure | Modules | <module name> | Dependencies tab:

Does Build | Rebuild action work in IDE?

Does Reload action (invoked in Gradle tool window) complete succesfully?


Please provide idea.log (Help | Show Log in ... action) after IDE restart and calling Reload action in Gradle tool window and screenshot for the problem. Thank you.

For uploading you can use or any file sharing service.

评论操作 固定链接

Hi, firstable I want to thank you for your response. I used all your suggestions without having a good result. But I found following:

  • This was my build.gradle file:
plugins {
id 'java'
id 'idea'

group 'com.demo'
version '1.0-SNAPSHOT'

repositories {
maven {
url ''
credentials {
username "aws"

dependencies {
implementation "com.myPackage:myArtifact:1.0"

test {

What does work?

CODEARTIFACT_AUTH_TOKEN=`aws codeartifact get-authorization-token --domain my_domain --domain-owner 111122223333 --query authorizationToken --output text`
  • In build.gredle replace System.env.CODEARTIFACT_AUTH_TOKEN justo for CODEARTIFACT_AUTH_TOKEN, I mean, use gradle property instead environment variable
  • Problem solved

Thanks a lot !!

评论操作 固定链接

Thank you for the information! Could you please advise - did the Reload action and IDE build (Build | Rebuild Project) action complete  successfully when you had this problem (when CODEARTIFACT_AUTH_TOKEN was set only as the OS the environment variable) or you saw the error (when was that error)? Thank you.

FTR: if I set the environment variable in the OS and use it in form of


in build Gradle script in IDE - IDE picks it up.

评论操作 固定链接

Hi Andrey,

When I did Reload using IDE action, it didn't fix the problem. Even a export the variable using the terminal in the IDE and then i used the refresh button in the Gradle window and it did not still not working.