TeamCity server and agents require JDK 1.5. My builds require JDK 1.4.2. The builds are currently setup to execute shell scripts on a Linux box. I wrote an ant wrapper build xml to run exec tasks to run the shell scripts. To enable the scripts to work properly, I had to set the default JAVA_HOME value to 1.4.2. Both agent and server are running on the same Linux box. To enable TC to start with runAll.sh, I added the following to the top of TeamCity/bin/catalina.sh & TeamCity/buildAgent/bin/catalina.sh:
The result is that the shell scripts that run the builds end up with JAVA_HOME being set to JDK 1.5. Since JAVA_HOME is not being exported, this doesn't seem right. BTW, setting the "JDK home path" value to JDK 1.4.2 in the build configuration through the UI has no effect. Also, setting nested env keys within the exec tasks that are running the shell scripts did not work. Am I missing something?