Regression caused by MNG-3529. I would suggest switching to option A, i.e. using the generally safe "$@" rather than QUOTED_ARGS, retesting carefully (is there a straightforward way to write unit tests for the script?), and punting on the MAVEN_OPTS problem until a solution to that can be found which does not regress anything else.

Note also that using exec as the last line of a launcher script is wise. Otherwise you can run into problems with SIGTERM not being propagated correctly to subprocesses when forking from another Java app (such as an IDE launching Maven); Ctrl-C from a shell will work but java.lang.Process.destroy will kill only the script and not the real Java process. The workaround is rather cumbersome: