在Windwos下新建一个文件夹创建一个文件
<?xml version="1.0"?>
<project xmlns="/POM/4.0.0" xmlns:xsi="http:///2001/XMLSchema-instance" xsi:schemaLocation="/POM/4.0.0 /xsd/maven-4.0.">
<modelVersion>4.0.0</modelVersion>
<groupId></groupId>
<artifactId>temp-download</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<!-- 需要下载什么jar包 添加相应依赖 其余部分无需在意-->
<dependency>
<groupId></groupId>
<artifactId>httpcore</artifactId>
<version>4.3.1</version>
</dependency>
</dependencies>
</project>
在本目录下执行cmd命令
call mvn -f dependency:copy-dependencies
下面就等待就可以了!
------------------------------------------------
这里要注意,如果没有安装Maven环境变量的同学,mvn请替换成你MAVEN目录bin目录下的完整路径
例如
call D:\apache-maven-3.5.0\bin\ -f dependency:copy-dependencies