Problem with aws CodeArtifacts
Answered
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 https://intellij-support.jetbrains.com/hc/en-us/community/posts/206152879-Gradle-Imports-Are-Not-Recognised, 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?
Please sign in to leave a comment.
>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 https://uploads.jetbrains.com 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:
plugins {
id 'java'
id 'idea'
}
group 'com.demo'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
maven {
url 'https://XXXXXX-111122223333.d.codeartifact.us-east-1.amazonaws.com/maven/YYYYYYYY/'
credentials {
username "aws"
password System.env.CODEARTIFACT_AUTH_TOKEN
}
}
}
dependencies {
implementation "com.myPackage:myArtifact:1.0"
}
test {
useJUnitPlatform()
}
What does work?
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.