Getting External Libraries Easily
August 13th, 2010 by Gregory ShragoJARs of many frameworks and their dependencies get updated too often now. But you do not want to turn your project into a Maven project just because of this? Then this feature is just for you.
In IntelliJ IDEA 10 you can search for & download libraries with dependencies for any framework published on some public maven repository. Minimum Maven experience is required. Just click ‘Attach Classes from Repository…‘

You can add your company repository to the list of searched repositories, if it is managed by Nexus, by providing the Nexus URL in Settings | Maven | Repository Indices | Nexus Locations list.
Try this in IntelliJ IDEA X EAP and let us know how it works for you.
UPDATE JavaDocs & Sources download as well as the Artifactory support are now available.

August 13th, 2010 at 9:23 am
Why just Nexus? Because you’re using the Nexus public index? Artifactory can generate Nexus public indexes if you turn the feature on in the admin console.
So if that’s the reason why the restriction to Nexus you should be able to use Artifactory as well.
August 13th, 2010 at 9:56 am
Would be nice if I could also specify a path to store source files to (optionally zipped).
I hate it when I can’t look into sources, so the feature is not of much use for me without this.
August 13th, 2010 at 11:18 am
Would be great if it can work with Ivy-based project too
August 14th, 2010 at 1:27 am
I guess I was the one who suggested this feature, right? And I am very pleased to see it added to the next version of IDEA.
August 14th, 2010 at 9:37 am
Doesn’t work for me.
I’ve tried with google guice 2.0 jars.
They are downloaded from repository, but never attached to the project. I mean the new guice library appears as attached (and contains both guice and aopalliance jars) but they are “not really” attached to the project. I use this feature only as an easy way to fetch some library, but then attach the downloaded jars with Attach Classes…
Certainly it will be a very handy way to attach jars to projects.
buildno = 96.802
Why doesn’t allow Idea IntelliJ About dialog to copy some stuff - like build no?
August 14th, 2010 at 9:38 am
I’ve tried with google guice 2.0 jars.
They are downloaded from repository, but never attached to the project. I mean the new guice library appears as attached (and contains both guice and aopalliance jars) but they are “not really” attached to the project. I use this feature only as an easy way to fetch some library, but then attach the downloaded jars with Attach Classes…
Certainly it will be a very handy way to attach jars to projects.
buildno = 96.802
Why doesn’t allow Idea IntelliJ About dialog to copy some stuff - like build no?
August 15th, 2010 at 10:08 am
@Ted, I think Gregory just isn’t familiar with Artifactory. This is a shame, I’d expect Jetbrains Maven support developers to be more proficient with Maven market. Anyway, it’s just bad selection of names in UI and in this blog post. Hopefully it will be fixed soon.
August 16th, 2010 at 4:25 am
Looks like IDEA uses REST API and not indexes, so probably it IS compatible only with Nexus. That’s bad. I opened an issue: http://youtrack.jetbrains.net/issue/IDEA-57652?projectKey=IDEA
August 16th, 2010 at 7:06 am
Useful feature though I’m always a little weary of whats really in public repositories, can be fragile. Any chance of JetGroovy plugin being able to reuse this feature to support Groovy Grape declarations from the IDE?
August 24th, 2010 at 1:16 pm
Richard, http://plugins.intellij.net/plugin/?id=4702. IDEA X will bundle this plugin. Though it’s not a re-use of the functionality mentioned in the post.
June 16th, 2011 at 4:40 pm
I will be helpful if we intellij can autocomplete exclusions
ex
com.xxx.publisher
subsystem-config
1.5.0-SNAPSHOT
org.springframework
spring-core
June 16th, 2011 at 4:41 pm
……..
org.springframework
spring-core
June 16th, 2011 at 4:43 pm
not able to post the whole thing..typing in words
after exclusions tag if someone does a ctrl space
IDEA should figure out all the jars that get pulled in as a transitive dependency and prompt the user with the exclusion that it can make
June 17th, 2011 at 8:37 am
Please create a feature request in our tracker at http://youtrack.jetbrains.net/dashboard
November 17th, 2011 at 10:47 am
I have tried and tried again but I couldn’t make it work. I created a new project with a new module with a GWT facet and i wanted to add the gwt-user dependancy to it via this feature. No matter what I wrote in the “coordinates” box (I tried gwt, gwt-user, com.google.gwt, com.google.gwt:gwt-user, com.google.gwt:gwt-user:2.4.0 and various others) it would never find the library. On the other hand, when I wrote hibernate (which I don’t need) it found 163 mqtches :(. Maybe I configured something wrong. Thanks for your help.
November 18th, 2011 at 2:15 am
Also in 10.5.2 one can not choose the repository URL to download from like in the dialog above.