O'Reilly logo

Apache Maven Cookbook by Raghuram Bharathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Downloading dependencies into a folder

Some projects may have a requirement for all the dependencies to be made available, say, in a folder. This could be to archive the dependencies used in a particular version of the build.

How to do it...

Use the following steps to download dependencies in the target/dependency folder:

  1. Let us open the demo project that we used in the previous recipe.
  2. Run the following command:
    mvn dependency:copy-dependencies
    
  3. See the output in the target/dependency folder:
    How to do it...

How it works...

The copy-dependencies goal of the Maven Dependency plugin copies over all the dependencies used in the project, including transitive dependencies, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required