Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-561

Improve startup scripts on windows/cygwin

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0.RELEASE, 1.0.1.RELEASE, 1.0.2.RELEASE
    • Fix Version/s: 1.1.0.M1
    • Component/s: @ ROO SHELL
    • Labels:
      None
    • Environment:
      Windows OS with cygwin

      Description

      It is good that ROO has support on Windows;
      But for those of us that cygwin, there are some gaps.
      1. the roo.sh does not run correctly in cygwin bash.
      selective use of 'cygpath' fixes. (see code below)

      2. Forced to deal with https://jira.springsource.org/browse/ROO-539
      We see that roo.bat needs to find and use the given JAVA_HOME -> ROO_JRE,
      versus using whatever is found in Window\Java\jre.

      Modify/Insert into roo.sh for cygwin:

      1. echo Resolved ROO_HOME: $ROO_HOME
        JAVA_EXT_DIRS=$ROO_HOME/dist:$ROO_HOME/lib:$ROO_HOME/work:$JAVA_HOME/jre/lib/ext

      OS=`uname`
      case "$OS" in
      CYGWIN*) # Convert cygwin paths to Windows format for Java:
      JAVA_EXT_DIRS=$(cygpath -mp ${JAVA_EXT_DIRS})
      ROO_HOME=$(cygpath -m "${ROO_HOME}")
      JAVA_HOME=$(cygpath -m "${JAVA_HOME}")
      M2_HOME=$(cygpath -m "${M2_HOME}")
      ;;
      *)

      1. nothing to do
        ;;
        esac

      while true; do
      java -Djava.ext.dirs="$JAVA_EXT_DIRS" $ROO_OPTS -Droo.home="$ROO_HOME" org.springframework.roo.bootstrap.Bootstrap "classpath:roo-bootstrap.xml" [email protected]
      -----------------

      In roo.bat, use %ROO_JRE%\bin\java; for :launch and :clean
      :launch
      %ROO_JRE%\bin\java -Djline.nobell=true -Djava.ext.dirs="%ROO_HOME%\dist;%ROO_HOME%\lib;%ROO_HOME%\work;%ROO_JRE%\lib\ext" %ROO_OPTS% -Droo.home="%ROO_HOME%" org.springframework.roo.bootstrap.Bootstrap "classpath:roo-bootstrap.xml" %*

        Attachments

        1. roo.bat
          1 kB
        2. roo.sh
          1 kB
        3. roo.sh
          1.0 kB

          Issue Links

            Activity

              People

              Assignee:
              balex Ben Alex
              Reporter:
              jpunt Jack Punt
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: