Getting External Libraries Easily

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.

This entry was posted in New Features and tagged , . Bookmark the permalink.

16 Responses to Getting External Libraries Easily

  1. Ted Wise says:

    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:

    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:

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

  4. Behrang says:

    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:

    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:

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

    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:

    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:

    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:

    ……..

    org.springframework
    spring-core

  13. Suresh says:

    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:

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

  15. dilbert says:

    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:

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

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">