Hey Christofer, I came across the same thing...my main build file (compile,test, jar) worked okay by itself but when it ran from the CC wrapper script (from a seperate directory), the java.home was not correct. Finally figured it out that the <ant antfile="..." /> does not spawn a new JVM and so the java.home (and other VM defined properties) are still set off of the CC build script and so it caused problems. Our problem appeared in that the basedir of the <junit .../> task was still set to the wrong location. We were able to solve it by setting the dir="/path" and fork="true" attributes of the <junit>. Good Luck, Ninju
----- Original Message ---- From: Christofer Jennings <[EMAIL PROTECTED]> To: user@ant.apache.org Sent: Monday, June 12, 2006 6:56:43 PM Subject: trouble with basedir (I think) I'm having trouble with basedir (I think). It all started with me trying to run a build.xml script from cruisecontrol (CC). CC uses wrapper scripts to run project builds. I've run the wrapper without CC and got the same results, so it's not CC. The wrapper build file looks like this... <project name="foo build wrapper" default="build" basedir="projects/foo"> <target name="build"> <echo message="path right now is ${java.library.path}" /> <!-- Get the latest from CVS --> <cvs command="up -d -P"/> <!-- Call the target that does everything --> <ant antfile="build.xml" target="clean"/> <ant antfile="build.xml" target="common.compile"/> </target> </project> This works fine for my other projects, but for foo I get weird results. So I think maybe it has to do more with foo's build file than the wrapper.Foo's build has lots of stuff in it, so I'll try to limit it here... <?xml version="1.0"?> <project name="Foo Builder" default="usage" basedir="."> <target name="init"> <property file="build.properties"/> <tstamp/> <property name="root.dir" value="."/> <property name="lib.dir" value="${root.dir}/lib"/> <property name="src.dir" value="${root.dir}/src"/> <property name="web.dir" value="${src.dir}/web"/> <property name="java.dir" value="${src.dir}/java"/> <property name="build.dir" value="${root.dir}/build"/> <property name="common.dir" value="${build.dir}/common"/> <property name="common.classes" value="${common.dir}/classes"/> <property name="wl.home" value="${beahome}/weblogic91"/> <property name="wl.lib" value="${wl.home}/server/lib"/> <taskdef name="wlappc" classname="weblogic.ant.taskdefs.j2ee.Appc" classpath="${wl.lib}/weblogic.jar"/> <taskdef name="autotype" classname=" weblogic.ant.taskdefs.webservices.javaschema.JavaSchema" classpath="${wl.lib}/weblogic.jar"/> <path id="common.classpath"> <fileset dir="${lib.dir}"> <include name="log4j.jar"/> <include name="dfc2-client.jar"/> <include name="jdc21-client.jar"/> </fileset> <pathelement path="${common.classes}"/> </path> </target> <target name="clean" depends="init"> <delete dir="${build.dir}" includeEmptyDirs="true"/> </target> <target name="prepare" depends="init"> <mkdir dir="${build.dir}"/> </target> <target name="common.compile" depends="prepare"> <mkdir dir="${common.classes}"/> <javac srcdir="${java.dir}" destdir="${common.classes}"> <classpath refid="common.classpath"/> <include name="foo/dto/*.java"/> </javac> </target> </project> So, on to the problem. When I run foo's build directly it works fine, but when I use the wrapper build I get ... C:\cc\projects\foo\src\java\foo\util\Bar.java:7: package javax.ejb does not exist import javax.ejb.CreateException; ^ It makes no sense to me. Why would something in foo/util be compiled when javac clearly is et to <include name="foo/dto/*.java"/>? I tried not using basedir in the wrapper build file. But then the taskdefs don't load... which does make sense to me. Any insights would be much appreciated. Thanks in advance, boz