Get MAVEN addresses, how to download jars from the central repository

Source: Internet
Author: User
Tags directory create maven central

Reprinted from: Through the MAVEN Central warehouse for jar package download

The MAVEN central repository contains a variety of jar packages and some jars that are not good to download can be done here. The download method is simple and fast.
First use maven to download the jar you have to know the specific values of MAVEN's dependent GroupID and Artifactid, here is a MAVEN central repository address where you can search for the GroupID and Artifactid specific values. For example, http://www.mvnrepository.com/, search for Jackson,
Then the Jackson-related jar will be listed, and the dots will be dependent (GroupID and Artifactid), and the copy will be done.

Know that GroupID and Artifactid can be downloaded.

1. Under any directory create a folder under which a Pom.xml file is created, a bat batch script (if you do not want to create a new bat and XML file can be downloaded: http://download.csdn.net/detail/u013791374/9638253). As shown in figure


2.

Select the bat batch script right-click Edit and copy the following:

Call Mvn-f Pom.xml dependency:copy-dependencies

@pause



3.

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"?>

<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>

<!--need to download what jar package to add the rest of the dependencies without worrying about--

<dependency>

<groupId>org.apache.httpcomponents</groupId>

<artifactId>httpcore</artifactId>

<version>4.3.1</version>

</dependency>

</dependencies>

</project>


4.

Finally, double-click the Run bat script. (Bat script for Windows systems.) If you are using a different system, the MAVEN command in BAT is the same, you can go to the appropriate directory from the command line and run the MAVEN command, or run it in a different script.

After running the new target folder, there is a dependency folder, which is the jar package you want.


Reference Address: http://jingyan.baidu.com/article/22fe7ced3b0a003002617fd1.html

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.