How do I download the Gson library?

我只是一个虾纸丫 提交于 2019-12-18 18:53:23

问题


Should be simple question.

When I go to https://github.com/google/gson I can only download the library as a zip folder as opposed to a jar file.

Where can I get the jar file?


回答1:


First you need to clone the repository locally on your computer:

git clone https://github.com/google/gson

Then you go inside the project folder ./gson and you create the jar file running:

mvn package

Of course to do this you need to have maven installed, if you are under osx you can install it running

brew install maven

Otherwise you can look for the installation for your system on the maven official website

After running mvn package the jar file will be in ./gson/gson/target/gson-2.7.1-SNAPSHOT.jar




回答2:


There is a MVN Repo http://mvnrepository.com/ there you will find how to add to a maven OR in your case how to download the lib jars




回答3:


I just downloaded it here:

https://jar-download.com/explore-java-source-code.php?a=gson&g=com.google.code.gson&v=2.7&downloadable=1

Is working for me.




回答4:


am bit late but for anyone in future, https://mvnrepository.com/artifact/com.google.code.gson/gson/2.8.0

ofcourse if its vresion changes you can figure it out from the base url.



来源:https://stackoverflow.com/questions/37975605/how-do-i-download-the-gson-library

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!