Automatically download jar packages using Maven
- Right-click the project to convert the project into a MAVEN project
Then go in Maven's official website
http://mvnrepository.com/
There are a lot of jar packages for us to use, such as I'm now going to download a jsoup jar package
- Search Jsoup, click the first one
Then there will be a version number, we click on the latest version 1.10.2
Copy the address under Maven
<!-- https://mvnrepository.com/artifact/org.jsoup/jsoup --><dependency> <groupId>org.jsoup</groupId> <artifactId>jsoup</artifactId> <version>1.10.2</version></dependency>
Edit Pom.xml File
In
</build></project>
The middle adds a
<dependencies></dependencies>
Label
And put Maven's copy in it.
Once saved, eclipse will automatically download the Jsoup.jar package.
Test the discovery, you can use the jar package.
Here's a little bit to note:
- If there is a problem with the Maven plugin, the MAVEN project will go wrong.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced. 54973954
Build a Maven project to automatically download the jar package