Skip to content

Phase 1 bug fixes: JAVA_HOME, CATALINA_HOME, and gradle initBundle retry - #11

Open
mirandastephane wants to merge 3 commits into
liferay:mainfrom
mirandastephane:ENBT-4105
Open

Phase 1 bug fixes: JAVA_HOME, CATALINA_HOME, and gradle initBundle retry#11
mirandastephane wants to merge 3 commits into
liferay:mainfrom
mirandastephane:ENBT-4105

Conversation

@mirandastephane

Copy link
Copy Markdown
Collaborator

Summary

This PR resolves all three critical bug fixes from the 2026 maintenance window
(Phase 1 of the Course Launcher Tool improvement plan).

Changes

ENBT-4103 · Fix JAVA_HOME not persisting between terminal sessions

  • .sh: appends JAVA_HOME and PATH update to ~/.bashrc, ~/.zshrc, and
    ~/.profile after Zulu JRE install — idempotent, only if not already present.
  • .ps1: persists JAVA_HOME and appends $ZuluPath\bin to user-scope PATH
    via SetEnvironmentVariable — idempotent check before writing.
  • Both scripts print a hint to open a new terminal for changes to take effect.

ENBT-4104 · Fix missing CATALINA_HOME after gradle initBundle

  • .sh: dynamically locates bundles/tomcat-* after initBundle and exports
    CATALINA_HOME for the current session. Persists to .bashrc, .zshrc,
    and .profile (idempotent).
  • .ps1: same discovery via Get-ChildItem -Filter tomcat-*. Sets
    $env:CATALINA_HOME for the session and persists to user scope via
    SetEnvironmentVariable.

ENBT-4105 · Fix invalid checksum on gradle initBundle (slow connections)

  • Wraps gradle initBundle in a retry loop (up to 3 attempts) on both scripts.
  • Cleans bundles/ and .gradle/ cache between retries.
  • Detects verifyBundle/checksum keywords and shows a specific message;
    falls back to a generic message for other errors.
  • .sh: uses set +e / tee / PIPESTATUS for live streaming + exit code capture.
  • .ps1: uses & + Tee-Object -Variable for zero-buffering live output and
    $LASTEXITCODE for exit code detection.

Testing

  • ENBT-4103: Tested on clean machine (no Java) — JAVA_HOME persists after
    reopening terminal on Linux, Mac, and Windows.
  • ENBT-4104: Server starts without "CATALINA_HOME not defined" error after
    running the script.
  • CENBT-4105: Simulated slow/interrupted connection — script retries and
    displays correct messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant