简体   繁体   中英

Adding javax.mail dependency jar to intellij library through gradle

I need to include the mail-1.4.7 jar file into my intellij idea project library through gradle build. I added the compile repository name into my build.gradle file as below:

compile 'javax.mail:mail:1.4.7'

Then i ran my build and although there is no error during the build, i am unable to see the jar in my project library. I was thinking through the gradle build, the jar will be managed automatically. Not sure if i need to try something else. I also tried running gradle :cleanIdea but without success.

Finally i was able to resolve this. I reverted all changes to start again. Followed the below steps:

  1. Add compile 'javax.mail:mail:1.4.7' to dependencies in build.gradle file.
  2. Run gradle build which will download the jar file to put in the repositories.
  3. Run gradle cleanIdea
  4. Run gradle idea

This resolved all the problems with the cleanidea clearing the iml files for intellij and regenerating through gradle idea command.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM