下载maven依赖的具体步骤如下:
1、 打开https://mvnrepository.com/连接,搜索你想要的依赖名称
2、 选择相应的版本
3、 创建一个空的文件夹,新建pom.xml文件。
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>temp.download</groupId>
<artifactId>temp-download</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
***<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka-server</artifactId>
<version>1.2.3.RELEASE</version>
</dependency>***
</dependencies>
</project>
4、 将第二步中选择的版本依赖替换掉第三步中带*号部分
5、 在pom.xml同级创建download.bat文件,内容如下:
call mvn -f pom.xml dependency:copy-dependencies
@pause
6、 点击运行download.bat文件,其会自动下载所需依赖包。在/target/dependency文件夹中既能看到你想要的jar包。