Homebrew / homebrew-core

🍻 Default formulae for the missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
13.58k stars 12.33k forks source link

brew install maven should not have ` depends_on "openjdk"` #177940

Closed muescha closed 1 month ago

muescha commented 1 month ago

brew gist-logs <formula> link OR brew config AND brew doctor output

brew gist-logs maven
Error: No logs.

Verification

What were you trying to do (and why)?

I would like to install Maven. I already have a version of Java installed and do not need any additional Java installations. I have installed Java using asdf.

There are many tools available for installing Java on a machine, including:

Therefore, it is unnecessary to install an additional Java version that might not be needed. It's also not always the best solution, given the numerous Java runtimes and versions available.

Link to the Maven formula on Homebrew

What happened (include all command output)?

When I install Maven, why does it fetch so many dependencies for such a "small" tool?

I don't need all this stuff:

==> Fetching dependencies for maven: giflib, libpng, freetype, fontconfig, xorgproto, libxau, libxdmcp, libxcb, libx11, libxext, libxrender, lzo, pixman, cairo, graphite2, harfbuzz, jpeg-turbo, lz4, zstd, libtiff, little-cms2, and openjdk

What did you expect to happen?

only install maven

Step-by-step reproduction instructions (by running brew commands)

brew install maven
SMillerDev commented 1 month ago

Does maven depend on Java? Then it should have a dependency.

Homebrew formulae can't really depend on users doing something outside of Homebrew since beginning users might not know about that.

carlocab commented 1 month ago

We're not able to test using Maven with alternative installations of Java, so we don't support what you're looking for. Sorry!