简体   繁体   中英

Does Java have an authoritative index of public libraries?

With Node.js, Ruby and other languages there seems to be a standard of where you can put your library so that folks can find it with their project / build tools. Is there a standard like that for Java? Is it: http://mvnrepository.com , are there alternatives?

Thanks!

not really.

java doesnt have a concept of a central library index. the closest is the central maven repository , which is not part of "java", but was created for use by maven (a common java build-tool*) based java projects. newer java build systems are also capable of using maven repositories, but there's no single "master repository". apart from maven central (which is by far the largest) a lot of major projects (jboss, for example) run their own repositories.

  • yes, i know i called it a build tool. im simplifying.

The most likely place to find a library/artifact is Maven Central. This is the default repository used by Maven builds. See http://maven.apache.org/guides/introduction/introduction-to-repositories.html for more info. However, you can reference multiple repositories in your build.

http://mvnrepository.com is a nice frontend for artifact discovery, but as far as I can tell doesn't host the artifacts, it just provides pointers to them.

Note that Java and Maven aren't synonymous, but they are tightly coupled, so Maven Central isn't the official "authoritative" artifact store, but it is the ad-hoc standard, and is used by other Java-associated dependency management tools like Ivy or Gradle.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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