How To Download Jars From Maven Repository

If you use maven in your java project, you should use pom.xml to add dependencies that your java project required. But sometimes you may need to add the third-party library jar files directly in your java project instead of using maven pom.xml.

This article will tell you another method that does not use maven download jar files but download the jar files from the maven repository directly. It will also tell you how to add the download jar files in your eclipse java project java build path.

1. Download Jar From Maven Central Repository Steps.

  1. Open a web browser and browse to goto maven central repository website.
  2. Input the jars maven groups, artifacts, or categories name in the search box and click the Search button. Then it will list all the related library links.
  3. For example, we want to download the google GSON library jars in the maven central repository, we just type GSON and click Search.
  4. Click the Gson link to go to the library detail page.
  5. Click the version number that you need, in this example, we click version link 2.8.5 to go to that version detail page.
  6. In the GSON version detail page, after the Files column, you can see a link which link text is jar (235 K ). This is just the Gson jar file link.
  7. Click the above link to download the Gson version 2.8.5 jar file.

2.Download Jar From

  1. There is another maven repository that you can download jar files from.
  2. Open a web browser and browse the URL or .
  3. Input the jar library group name or artifact name in the search box, it will list all matched jar libraries.
  4. If you know the jar library group name, artifact name, and version, you can input something like g:com.dolphindb AND a:jdbc AND v:1.10.2 in the search box, this can make the search more accurate.
  5. Now it will list the matched maven jar library on the page, click the Download link at the end of the row, then you can select download jar, javadoc.jar,pom or sources.jar file.
    download the maven jar files from
  6. But if you browse into some artifact detail webpage ( for example ), when you click the Download link at the top right corner of the page, it will only list one item pom. In such a case, you can search the artifact name in the search box, and click each listed artifact’s Download link, and you can find some link can download the jar item and some link can only download the pom.

3. Add Download Jars Into Java Project.

After download jar files from the maven central repository, before you can use them, you need to add them to your java project. Below are the steps to add the jar to your java project using eclipse.

  1. Right-click the java project name in eclipse, and click Properties menu item in the popup menu list.
  2. Click Java Build Path menu item in the left panel of the popup window, click the Libraries tab in the right panel, and click Add External JARs button.
  3. Browse to the folder where the downloaded jar file is saved and click the Open or Save button to add it to the java build path. Then click Apply and Close button to add the jars to the java project. Now you can use the jars contained java classes in your java code.
4 1 vote
Article Rating
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Oldest Most Voted
Inline Feedbacks
View all comments
David Howard
David Howard

I have a java application, and I want to deploy it in a script file. In the script file, it should first download the java app jar file to a local directory from a central repository, and them run the jar file in java command line.

I do not know how to download my java app jar file to a specified folder in the script, my question is not downloading the jar file to maven local repository, but download it to any local folder.

Can anyone give me some help? Thanks a lot.

Vidyasagar Mundroy
Vidyasagar Mundroy

It took a while as I was looking for a link name “Download” but did not find one. Then I referred to your article as the download link is given by field “Files”! Thanks a lot.

Joaquim Muchaxo
Joaquim Muchaxo

This Hint saved my week!
I was looking everywhere and going in circles to get
then I selected the version and clicked FILES / JAR
and downloaded the file then added it my lib folder of react native project
Thank you!

Would love your thoughts, please comment.x