ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arun <>
Subject Passing environment to cron
Date Sat, 20 Oct 2007 15:47:15 GMT

 have a problem running ant script as a cronjob. The cron tells

/home/build/mobchannel/mobchannelWEB/${env.CATALINA_HOME}/bin not found.
But when I directly execute the build.xml using ant this error does not

 <property environment="env" />

        <property name="tomcat.home" value="${env.CATALINA_HOME}" />
        <property name="" value="mobchannelWEB" />

        <property name="java.home" value="${env.JAVA_HOME}" />
        <property name="webapp.path" value="WebRoot" />
        <target name="jspc">
                <taskdef classname="org.apache.jasper.JspC" name="jasper2">
                        <classpath id="jspc.classpath">
                                <pathelement location="${
                                <fileset dir="${tomcat.home}/bin">

 My CATALIN_HOME points to correctly and so does my JAVA_HOME.

The ${tomcat.home}/bin is getting expanded to path
/home/build/mobchannel/mobchannelWEB/${env.CATALINA_HOME}/bin .

When it should have been /usr/local/bin/apache-tomcat-6.0.13/bin.

Why does my ant script do this when run from a cronjob using perl script.

Obviously the env property should be empty. I am calling ant -logfile
build.log from my perl script. And I am including the perlscript as a cron

How can I pass the environment to ant. I have my CATALIN_HOME entry in
~/.bashrc. And When I echo in console I can see that too.

Arun George

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