Using Maven to just download JARs

后端 未结 3 1502
春和景丽
春和景丽 2021-02-03 20:03

I would like to have Maven download the JARs listed in a pom.xml file. How do I do that? Currently, Maven wants to compile the project (and it fails). I don\'t care about com

相关标签:
3条回答
  • 2021-02-03 20:30

    Your best approach is to use m2eclipse and import your pom into eclipse. It will download and link all dependencies to your project, and as an added bonus, it will also download and associate their source and javadoc jars. It does not really matter if the project has hundreds or just few dependencies, it will work the same.

    Sometimes, we want to do something quickly and be done with it, but it ends up taking longer than doing the right away especially when there hundreds of dependencies.

    0 讨论(0)
  • 2021-02-03 20:45

    Try

    mvn install dependency:copy-dependencies
    

    You will see all the jars under 'target/dependency' folder

    0 讨论(0)
  • 2021-02-03 20:48

    You can try this command:

    mvn dependency:resolve
    

    Or just invoke the "install" life cycle as follows:

    mvn install
    
    0 讨论(0)
提交回复
热议问题