Is there any tool for java that I can use to automatically download the jars for the frameworks I want to use and manage there dependencies in Eclipse. I have always admired Visual Studio and how easy it is to do stuff like that and I'm wonder if there is any capability like that for Eclipse.
-
6maven. Maven. MAVEN!! – Boris the Spider Apr 09 '13 at 13:28
-
Weellll Eclipse itself is pretty powerful, are u sure it can't suffice? edit: Oyaa [Maven is it](http://maven.apache.org/eclipse-plugin.html) – Caffeinated Apr 09 '13 at 13:28
-
How do you do dependency management in VS? – maba Apr 09 '13 at 13:29
5 Answers
Use Maven, along with the m2 plugin for Eclipse. It is the most common way to automatically download dependencies in the Java world.

- 57,719
- 77
- 200
- 270
The best tool for dependency management is Maven. This would require you to maven-ify your eclipse project however.
With maven you specify your top-level dependency and Maven will work out what that dependency depends on.
Here is an SO question on converting an eclipse project to maven.

- 1
- 1

- 59,842
- 6
- 106
- 166
You can try Ivy http://ant.apache.org/ivy/, its a bit rough start but works great.

- 2,180
- 1
- 19
- 25
if you use maven as build tool
You could define the dependancies in pom.xml as below which will automatically download jars(junit-4.0.jar in this case) from specified repository on maven build.
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.0</version>
<type>jar</type>
<scope>test</scope>
<optional>true</optional>
</dependency>
...
</dependencies>

- 3,605
- 17
- 35
See Apache Buildr. It's compatible with maven repositories and uses Ruby scripting language instead of tenths of XML files.
Other options is Graddle, similar to latter and Groovy-based.

- 30,615
- 24
- 120
- 162