6 ms·
As much as it can be annoying to type out those imports in Java, I agree. All the "first one who asks for the name gets it" package managers suffer from proble
by kelnos 4y ago
As much as it can be annoying to type out those imports in Java, I agree.
All the "first one who asks for the name gets it" package managers suffer from problems (some of them security-related) that anything that talks to Maven Central does not.
If you want an account on Sonatype's OSS repository (which allows you to push to Maven Central), you need to prove that you have control of the domain you want to use (in reversed form) as the "group ID" you publish libraries under (IIRC, by setting a TXT record in DNS). Meanwhile, to publish to crates.io, you just link your GitHub account (which is required, gross), and then you can publish to any package name that hasn't yet been taken, and then it's yours, forever. That seems terrible, somehow.
(Granted, that just covers the group ID for depending on the library; you can put Java classes in that library wherever you want, even in "other people's" namespaces. In practice, though, I don't think this ends up being a big issue.)
(Also granted, if you let your domain registration lapse, someone else could snap it up and possibly hijack your namespace. But I wouldn't be surprised if the Sonatype folks would try to get in touch with you if someone else tried to claim your namespace, even if they had control over the domain.)
- devman0 4y agoI worked for many years in the enterprise java world, and when I went to do other things I was surprised how bad or incomplete package management is in other language ecosystems. The maven packaging system (as distinct from the Maven tool itself) makes managing dependencies for building and shipping java applications much more sane.
- chaosite 4y agoTo reiterate the point on the Maven packaging system vs. the Maven tool itself: All the post-Maven build automation tools in the JVM world, including Gradle, Apache Ivy, and sbt (the Scala build tool) use Maven repositories. Good package index sites give you the syntax to grab the package in your tool of choice, for example (click the tabs): https://mvnrepository.com/artifact/org.apache.commons/commons-lang3/3.12.0 https://mvnrepository.com/artifact/org.apache.commons/common...
- veber-alex 4y agoGatekeeping people from publishing crates behind owning a domain will never work in the Rust ecosystem.
- marginalia_nu 4y agoPlenty of com.github.xyz -packages in Java. c.f. https://jitpack.io/ https://jitpack.io/
- oblio 4y agoThey don't need to "own" anything. They can just use Github pages or any free subdomain in this entire universe. If you can't be bothered to set up a free account in 5 minutes somewhere, how valuable or trustworthy is your library, really?