ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Jack" <>
Subject RE: running ant under cron
Date Tue, 27 May 2003 14:34:45 GMT
I've had problems like this, and I think it is to do with your environment
not being the same when you run cron as when you log in. I suspect your PATH
or maybe CLASSPATH are not set, and hence when ant tries to load a compiler
from the JDK tools lib it can't find it. I'd stick an <echoproperties /> in
to your build, for starters, and then start looking at your environment to
see the difference when cron runs. Good luck.


-----Original Message-----
From: Steve Cohen []
Sent: Tuesday, May 27, 2003 8:21 AM
To: ant-user
Subject: running ant under cron

I am trying to run ant from cron to run an automated build script.  The
script runs fine from the command line, but fails under cron.

It is a long, complicated, build script and it makes it all the way
through the actual build even under cron.

However, it next runs the <test> target and here it fails to compile the
test code, exiting with the error

	"Modern compiler not found - looking for classic compiler"

It had no trouble finding the modern compiler during the build phase.
Ironically, this compile is the only compile I do which is NOT forked
(because I want to pull in the junit stuff on the ant classpath).  What
am I doing wrong, or is there a better way to accomplish this whole

Here is the target that fails:

        <javac srcdir="${dir.src.test}"
            <include name="**/*.java"/>
                <pathelement location="${}"/>
                <pathelement path="${java.class.path}"/>
                <fileset refid="globallibs"/>
                <fileset refid="buildlibs"/>
                <fileset refid="testonlylibs"/>

Steve Cohen
Sr. Software Engineer
Sportvision Inc.
4410 N. Ravenswood Ave.
Chicago, IL 60640

  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message