我如何下载Gson库? [英] How do I download the Gson library?

查看:166
本文介绍了我如何下载Gson库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

应该是简单的问题。

当我访问 https:// github .com / google / gson 我只能将该库作为zip文件夹下载,而不是jar文件。



我在哪里可以获得jar文件?

解决方案

首先,您需要在您的计算机上本地克隆存储库:

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



然后你进入项目文件夹./gson,然后创建运行的jar文件:

  mvn package 

当然要做到这一点,你需要安装maven,如果你在osx下,你可以安装它



  brew install maven 

否则,您可以在 maven官方网站上查找系统的安装信息

p>

后r unning mvn包的jar文件将位于./gson/gson/target/gson-2.7.1-SNAPSHOT.jar中。


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?

解决方案

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

这篇关于我如何下载Gson库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆