2

Newbie question on maven and java!

I have a simple project that depends on itextpdf (com.itextpdf) version 5.5.4. I would like maven to identify all the dependencies of that library and "automatically" download the dependent libraries or at least point out the dependent libraries and their versions.

Is this possible?

For ex: in node.js, I just need to say "npm install [@version]" and it takes care of installing that module and also all dependent modules. I don't have to do anything else. The option "--save" automatically updates my packages.json.

rsmoorthy
  • 2,284
  • 1
  • 24
  • 27

1 Answers1

2

Use maven-dependency-plugin.

To download all dependencies use:

dependency:copy-dependencies takes the list of project direct dependencies and optionally transitive dependencies and copies them to a specified location, stripping the version if desired. This goal can also be run from the command line.

To list all dependencies use:

dependency:list alias for resolve that lists the dependencies for this project.

NiematojakTomasz
  • 2,433
  • 20
  • 23
  • Thanks. Though it is helpful, I found this stackoverflow thread more helpful: http://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven – rsmoorthy Jan 17 '15 at 22:39