
前置条件:需要正确配置maven环境
1.新建pom.xml
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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>javax.servlet</groupId>
		<artifactId>javax.servlet-api</artifactId>
		<version>3.1.0</version>
	</dependency>
 </dependencies>
</project>
2.下载源代码在仓库中.bat
call mvn -f pom.xml dependency:sources
@pause
3.下载jar包在当前目录.bat
call mvn -f pom.xml dependency:copy-dependencies
@pause
运行bat文件即可。。