Fix caveats in Maven formulas

`brew info` did not display caveats for these formulas. Now it does.

I only had to fix a typo in the name of the method.