简体   繁体   English

NuGet 的 Java 等价物是什么?

[英]What is the Java equivalent of NuGet?

I'm just embarking on some Java work after working exclusively in C# for about a decade;在专门使用 C# 工作了大约十年之后,我才开始从事一些 Java 工作; I'm using IntelliJ as my IDE.我使用 IntelliJ 作为我的 IDE。 I can't find the equivalent of NuGet for Java.我找不到 Java 的 NuGet 等价物。 How do Java developers re-use third party code? Java 开发人员如何重用第三方代码? NuGet solves so many problems for me in .NET that I can't believe there isn't a direct equivalent...? NuGet 在 .NET 中为我解决了很多问题,我不敢相信没有直接的等价物......?

After several hours of following dead ends, installing Maven, customizing environment variables and chasing down dependencies, I eventually found that in IntelliJ under project structure it is possible to add a library directly from Maven.经过几个小时的死胡同,安装Maven,自定义环境变量,追查依赖,我终于发现在IntelliJ的project structure下可以直接从Maven添加一个库。 Perfect!完美的!

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.xml where you will be mention about dependency .如果您使用 maven,您将在pom.xml中提及相关性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM