Most of us now manage packages with tools such as Maven, but in special cases you still need to download the packages locally. We can do this with the MAVEN command. Create a Pom.xml file with the following file contents:
<?xml version= "1.0" encoding= "UTF-8"? ><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>spider</groupid> <artifactid>spider</artifactid> <version>1.0</ version> <dependencies> < dependency> <!-- jsoup html parser library @ http://jsoup.org/ --> <groupId>org.jsoup</groupid> < artifactid>jsoup</artifactid> <version>1.9.2</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-mapper-asl</artifactId> <version>1.9.13</version> </dependency> </dependencies> <build> <plugins> <plugin> <artifactId>maven-dependency-plugin</artifactId> <configuration> <excludeTransitive>false</excludeTransitive> <stripversion>true</ stripversion> <outputDirectory>./lib</outputDirectory> </configuration> </plugin> </plugins> </build></project>
Then press the SHIFT key in the current directory and right-click and select "Open Command Window Here". Then enter the command in the command window:
MVN dependency:copy-dependencies
After the return run, you can find a Lib folder under the current directory, which is the jar package we need. As shown in the following:
Original address: Download the specified jar package to the specified local directory via MAVEN Similar articles:
- "Teach her to write code." Use Git on your Mac to collaborate
- IntelliJ Idea+maven Configuration SPRINGMVC Environment
Download the specified jar package to the specified local directory via MAVEN