Gyeongtae Park created ZEPPELIN-6217: ----------------------------------------
Summary: Refactor duplicated JAVA_HOME setup logic in mvnw script Key: ZEPPELIN-6217 URL: https://issues.apache.org/jira/browse/ZEPPELIN-6217 Project: Zeppelin Issue Type: Improvement Reporter: Gyeongtae Park Fix For: 1.0.0, 0.12.1, 0.13.0 The {{mvnw}} shell script currently contains multiple blocks of code that attempt to determine and set the {{JAVA_HOME}} environment variable, depending on the operating system and environment (e.g., Darwin, Gentoo, Cygwin, etc.). These logic blocks are duplicated and scattered throughout the script, making the code harder to maintain and extend. To improve readability and maintainability, we should refactor this logic into a dedicated function (e.g., {{{}set_java_home(){}}}), and call it once near the top of the script. This will consolidate all {{JAVA_HOME}} resolution logic into a single, centralized location. *Benefits:* * Improves maintainability * Reduces duplication * Makes platform-specific logic easier to update *Suggested changes:* * Extract repeated {{JAVA_HOME}} detection blocks into a function * Replace inline logic with a single call to the new function * Ensure compatibility across Darwin, Linux, Cygwin, and Mingw environments -- This message was sent by Atlassian Jira (v8.20.10#820010)