views:

34

answers:

2

I want to start using maven in code I distribute but I can't find an efficient way to work with dependencies. Every new dependency takes me far too long to add.

As a simple example, I need to add Tomcat for compilation. Do I really have to manually trawl the repo in my browser to find the group-id, artifact-id and version number?

In every case it seems easier to find the non-maven downloads. I hope I've missed something obvious.

+2  A: 

Do I really have to manually trawl the repo in my browser to find the group-id, artifact-id and version number?

No. Use a repository search engine. Some are mentioned here, more here. Some IDE also offer facilities to search and add dependencies (e.g. Eclipse with m2eclipse).

Pascal Thivent
Thanks, I think that will help me keep my sanity.I'm using IntelliJ where the maven search doesn't seem to work.
Tom
A: 

First of all, using some IDE really helps. Eclipse has m2eclipse plugin and if you define locations of remote maven repositories in your pom definition, you can add dependencies in its pom editor and it will automatically search the proper artifacts for you.


What is really helpful is using repository manager like Nexus / Artifactory, where you gather the most important maven repositories and then you don't need to declare particular repository locations in your pom definition for various artifacts, but everything will be proxied via Nexus.

lisak