0

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.

user2054833
  • 2,115
  • 7
  • 24
  • 39

5 Answers5

5

Use Maven, along with the m2 plugin for Eclipse. It is the most common way to automatically download dependencies in the Java world.

Eric Wilson
  • 57,719
  • 77
  • 200
  • 270
1

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.

Community
  • 1
  • 1
Boris the Spider
  • 59,842
  • 6
  • 106
  • 166
0

You can try Ivy http://ant.apache.org/ivy/, its a bit rough start but works great.

dolbi
  • 2,180
  • 1
  • 19
  • 25
0

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>
Jaydeep Rajput
  • 3,605
  • 17
  • 35
0

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.

Mariusz Jamro
  • 30,615
  • 24
  • 120
  • 162