0

maven noob here

I have this in my pom.xml file

<dependency>
  <groupId>com.amazonaws</groupId>
  <artifactId>aws-encryption-sdk-java</artifactId>
  <version>1.6.1</version>
</dependency>

but for some reason, when I do mvn dependency:resolve, this will never show up in the list, and the code itself is forever failing to import com.amazonaws.encryptionsdk. Also the jar file wouldn't appear under External Libraries in IntelliJ.

If my googling skills haven't filed me, isn't mvn dependency:resolve suppose to download the jar file? Please let me know what I'm missing. Thanks!

Kei
  • 611
  • 2
  • 11
  • 24
  • Can't reproduce, [see the screenshot](https://i.imgur.com/8suRaAM.png). What error do you get if you run `mvn clean package` in the command line? – CrazyCoder Mar 16 '20 at 21:38
  • @CrazyCoder Actually it shows under `mvn dependency:resolve` now once I got off VPN. But it's still not imported properly. When I `mvn clean build` it builds successfully without error messages. – Kei Mar 16 '20 at 21:58

1 Answers1

1

Which repositories are you connecting to?
Are you connecting to nexus/artifactory/... which in its turn cannot download the dependency?
You can check the repositories in the settings.xml (usually in a .m2 folder).
If using nexus/artifactory/... please check in the respective application if something fails

Are you behind some kind of proxy server?

You can check additional logging output by adding one of following flags to the command:

-e, --errors  (Produce execution error messages)
-X, --debug (Produce execution debug output)

I commonly use mvn clean install

Manuel
  • 239
  • 1
  • 4
  • I'm using artifactory, and I think I've already modified the `settings.xml` to what it needs to be. I've tried changing some vpn settings, ans now seems like it's showing up when I do `mvn dependency:resolve`, however it's still not in `External Libraries` nor can be imported. When I `mvn clean install` it never shows any error message (except for the tests failing probably cause of the missing dependency). – Kei Mar 16 '20 at 21:48
  • 1
    In intellij you can try to reimport the maven project now that the dependency has been downloaded? – Manuel Mar 16 '20 at 21:58
  • That worked!!!!!! Thank you so much!!!!!! That was totally me being a noob lol. – Kei Mar 16 '20 at 22:00