1

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.

Pascal Thivent
  • 562,542
  • 136
  • 1,062
  • 1,124
Tom
  • 28
  • 2
  • I work at a place that uses maven and find it a real pain. Managing dependencies is one issue. There's also a lack of accessible information about maven, and it has been hard for me to find good answers to maven related questions. Google Ant vs. Maven if you haven't already to read about diverse opinions on this. – Eric J. May 25 '10 at 22:16
  • I work at a place that uses ant and find it a real pain. Well, actually it's not true, I haven't used ant since 2003, but it could be since pain is subjective. – Pascal Thivent May 25 '10 at 22:36
  • I do find maven frustrating. I was surprised that I still have to edit xml. What has impressed me though is how easily projects can be imported in to IDEs - and I definitely want tutorials and OSS I distribute to be as accessible as possible. – Tom May 26 '10 at 13:48

2 Answers2

3

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

Community
  • 1
  • 1
Pascal Thivent
  • 562,542
  • 136
  • 1,062
  • 1,124
  • Thanks, I think that will help me keep my sanity. I'm using IntelliJ where the maven search doesn't seem to work. – Tom May 26 '10 at 13:35
1

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
  • 21,611
  • 40
  • 152
  • 243