Getting External Libraries Easily

Posted on by gregsh

JARs 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.

Comments below can no longer be edited.

18 Responses to Getting External Libraries Easily

  1. Ted Wise says:

    August 13, 2010

    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.

  2. Stephen says:

    August 13, 2010

    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.

  3. alphageek says:

    August 13, 2010

    Would be great if it can work with Ivy-based project too

  4. Behrang says:

    August 14, 2010

    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. 🙂

  5. Doesn't work for me says:

    August 14, 2010

    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?

  6. Doesn't work for me says:

    August 14, 2010

    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?

  7. Baruch Sadogursky says:

    August 15, 2010

    @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.

  8. Baruch Sadogursky says:

    August 16, 2010

    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

  9. Richard Osbaldeston says:

    August 16, 2010

    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?

  10. Peter Gromov says:

    August 24, 2010

    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.

  11. Suresh says:

    June 16, 2011

    I will be helpful if we intellij can autocomplete exclusions

    ex

    com.xxx.publisher
    subsystem-config
    1.5.0-SNAPSHOT

    org.springframework
    spring-core

  12. Suresh says:

    June 16, 2011

    ……..

    org.springframework
    spring-core

  13. Suresh says:

    June 16, 2011

    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

  14. Gregory Shrago says:

    June 17, 2011

    Please create a feature request in our tracker at http://youtrack.jetbrains.net/dashboard

  15. dilbert says:

    November 17, 2011

    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.

  16. dilbert says:

    November 18, 2011

    Also in 10.5.2 one can not choose the repository URL to download from like in the dialog above.

  17. ganjo says:

    April 14, 2016

    For downloading external libraries, go to this website: http://jar-download.com/

  18. Erik says:

    January 20, 2018

    I just tried org.jetbrains.exposed, and it didn’t find it. The only org.jetbrains it finds are for annotations.

Subscribe

Subscribe for updates