Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6128

JAVA_HOME resolution not working on IBM i under PASE

    XMLWordPrintableJSON

Details

    Description

      Running the "mvn" command on an IBM i (aka AS/400, iseries or system i) machine in the PASE (UNIX Bourne-like shell) environment without having first set JAVA_HOME results in the following error:

      001-0050 Syntaxfehler bei Zeile 144: Token "!" nicht erwartet. 
      

      (Syntax failure on line 144: Token ! unexpected)

      I was able to prevent the error by changing this line in the mvn shell script:

        if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then

      to

        if [ -n "$javaExecutable" ] && ["`expr \"$javaExecutable\" : '\([^ ]*\)'`" != "no" ]; then

      The automatic JAVA_HOME resolution fails on IBM i anyway due to the specific location of the JVM on this platform, I could probably suggest a way to fix it if anyone's interested.

      Attachments

        Activity

          People

            Unassigned Unassigned
            fathert Tim
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: