Yes, there is Ant, Maven, Gradle, etc. but these are more dependency management. Why isn't there something more similar to npm, cpan, etc.? The closest thing I see is https://jpm4j.org/ but it seems to have slowed down.
There are plenty already.<p><a href="http://leiningen.org/" rel="nofollow">http://leiningen.org/</a>
<a href="http://www.scala-sbt.org/" rel="nofollow">http://www.scala-sbt.org/</a>
It sucks, but it's probably because Java is used so much by large enterprises - and big organizations often won't tolerate using other people's code or sharing their code with other people. Node and Perl are used more by individuals (or startups) doing small bits and sharing back and forth.<p>If you start one I'll use it though. :)