NuGet 的 Java 等价物是什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25342106/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-02 07:51:30  来源:igfitidea点击:

What is the Java equivalent of NuGet?

javanuget

提问by Tim Long

I'm just embarking on some Java work after working exclusively in C# for about a decade; I'm using IntelliJ as my IDE. I can't find the equivalent of NuGet for Java. How do Java developers re-use third party code? NuGet solves so many problems for me in .NET that I can't believe there isn't a direct equivalent...?

在专门使用 C# 工作了大约十年之后,我才开始从事一些 Java 工作;我使用 IntelliJ 作为我的 IDE。我找不到 Java 的 NuGet 等价物。Java 开发人员如何重用第三方代码?NuGet 在 .NET 中为我解决了很多问题,我不敢相信没有直接的等价物......?

回答by Tim Long

After several hours of following dead ends, installing Maven, customizing environment variables and chasing down dependencies, I eventually found that in IntelliJ under project structureit is possible to add a library directly from Maven. Perfect!

经过几个小时的死胡同,安装Maven,自定义环境变量,追查依赖,终于发现在IntelliJ下project structure可以直接从Maven添加库。完美的!

回答by Nikhil Kumar K

In java world for dependency management java we can maven (Commonly used) or ivy (little used) , Gradle (Latest) .

在依赖管理java的java世界中,我们可以使用maven(常用)或ivy(很少使用),Gradle(最新)。

To get install third party jar in any ide use maven update

要在任何 ide 中安装第三方 jar,请使用maven update

If you use maven you will be pom.xmlwhere you will be mention about dependency .

如果您使用 maven,您将在pom.xml中提到相关性。