Adding maven dependencies

My experience using the Maven support in IDEA is limited so far.

Is there some support for adding new dependencies to a pom.xml?
Something like:

  • Alt-Insert in pom.xml.."Generate...Dependency"

  • Look through (indexed) repositories (both local and remote), including ones that are declared in current pom.xml

  • Let me SpeedSearch through a list of all candidates

  • Let me select one, allow me to exclude some transitive dependencies (if applicable)

  • It could be smart, eg inside <plugins> it could offer plugins only


The basic idea is getting from "I need to use some library foo" to "getting the relevant stuff into pom.xml" as quickly as possible.

3 comments
Comment actions Permalink

builtin maven support does not (yet) allow this.

might be worth looking at Maven repo search plugin, which allows to query artifacts available (I think it's only a frontend for a website).
when selecting an artifact you can then rightclick and copy the relevant dependency node for it

0
Comment actions Permalink

I don't know if it's http://mvnrepository.com/ that it fronts, but it not, that's a useful one to use.

0
Comment actions Permalink

Thanks Thibaut, Gwyn.

Of course there are many ways to search the various repositories, and I use some of them.

However, adding a Maven dependency to a project is a relatively common operation, so I would expect IDEA to offer some help here.
Searching through a number of repositories and presenting versions, dependencies to exclude, etc seems an ideal candidate for some automation.

Are there any existing JIRA tickets covering this?

0

Please sign in to leave a comment.