Download the specified jar package to the specified local directory via MAVEN

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.