OK, here's my configuration, now using snapshot version 1.104-SNAPSHOT
(private-04/21/2007 06:11-hudson):
Tomcat is starting using C:\Program Files\Java\jre1.5.0_03.
The JDK in Hudson is set to C:\Program Files\Java\jdk1.5.0_03, and the project
is set to use this JDK.
From the (debugging) console output:
=======
started
Reporters=[hudson.maven.reporters.MavenArtifactArchiver@1908404,
hudson.maven.reporters.MavenFingerprinter@cb5de2,
hudson.maven.reporters.MavenJavadocArchiver@180ab18,
hudson.maven.reporters.SurefireArchiver@60cf12,
hudson.maven.reporters.BuildInfoRecorder@1bac9d0]
Using env variables:
{JOB_NAME=uk.co.alexmcmanus:testtools,
HUDSON_HOME=C:\.hudson, BUILD_NUMBER=26,
BUILD_TAG=hudson-uk.co.alexmcmanus:testtools-26, JAVA_HOME=C:\Program
Files\Java\jdk1.5.0_03, BUILD_ID=2007-04-22_18-10-06, PATH=C:\Program
Files\Java\jdk1.5.0_03\bin, EXECUTOR_NUMBER=1}
$ java -cp "C:\Program Files\Apache Software Foundation\Tomcat
5.5\webapps\hudson\WEB-INF\lib\maven-agent-1.104-SNAPSHOT.jar;C:\ProgramFiles\maven-2.0.4\core\boot\classworlds-1.1.jar"
hudson.maven.agent.Main C:\ProgramFiles\maven-2.0.4 "C:\Program Files\Apache
Software Foundation\Tomcat
5.5\webapps\hudson\WEB-INF\lib\remoting-1.104-SNAPSHOT.jar" "C:\Program
Files\Apache Software Foundation\Tomcat
5.5\webapps\hudson\WEB-INF\lib\maven-interceptor-1.104-SNAPSHOT.jar"
channel started
[INFO] Scanning for projects...
=======
So, according to that it seems to be choosing the correct JDK. However, if you
look further down in the console output, Maven reports that it is actually using
a different JDK (neither the one that I set, or the Tomcat JDK):
=======
[INFO] Compilation failure
Unable to locate the Javac Compiler in:
C:\Program Files\Java\jre1.5.0_11\..\lib\tools.jar
=======
Strange..! Ahh, that's interesting - checking the environment properties of the
Tomcat process, it has JAVA_HOME set to C:\Program Files\Java\jre1.5.0_11, which
at least explains where that came from. I don't know what magic is setting the
JAVA_HOME to that - there is no Tomcat configuration for it as far as I know,
and if I open a DOS console and echo %JAVA_HOME%, it comes up with
"C:\j2sdk1.4.2_04"..!
Cheers, Alex.
Thanks for the report. Fixed in 1.104.