- Create a folder under any directory, under which you create a pom.xml file, a bat batch script;
- Select the bat batch script right-click Edit and copy the following:
Call Mvn-f pom.xml dependency: Copy-dependencies@Pause
- Pom.xml does not need to be as complex as the actual project, the example is as follows (<?xml version= "1.0"?> must be in the first line of text):
<?XML version= "1.0"?><Projectxmlns= "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><!--what jar packages need to be downloaded add the rest of the dependencies without care - <Dependency> <groupId>Mysql</groupId> <Artifactid>Mysql-connector-java</Artifactid> <version>5.1.34</version> </Dependency> </Dependencies></Project>
- After running the new target folder, there is a dependency folder, which is the jar package you want.
- The values of the related fields, such as groubid in the Dependecy node, can be searched and retrieved from the http://mvnrepository.com.
Download the relevant jar package using the Maven tool