Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Not A Problem
-
3.3.9
-
None
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.