I see what is the case now. build.sh and ant construct java executable location based on
JAVA_HOME environment variable where junit relies on PATH being set correctly.
That should never be a problem for hudson, because it always sets both - JAVA_HOME and
PATH. As well our QA scripts do the same when changing java version.
It makes some sense to have junit.jvm property default to JAVA_HOME/... but see the logic
in ant.sh to guess the java executable location. As well there are often cases where
JAVA_HOME is not set (AFAIK when user is using the default jvm installed with the OS and
probably on systems like azul).
It should be possible to change it to:
1. if JAVA_HOME is not set, then set to "java"
2. if JAVA_HOME is set, then to setup like ant.sh does
But actually I think it is better to check if the first java executable in PATH is within
JAVA_HOME, and if not, then fail the build. I'm sure everybody happened to mismatch
these a couple of times, so saved hassle could be considerable.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4209569#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...