Sorry, by script I mean something that resembles the cron entry I listed...
Scot P. Floess wrote:
Arun:
I believe your problem is related to the way in which cron is
running. I don't believe your .bashrc is being sourced. You may need
to either write a script to kick off your ant tasks or perhaps make
the cron entry resemble something like
. ~/.bashrc ; ant -f [dir to build.xml]/build.xml [whatever tasks you
call]
Please note the preceeding dot in
. ~/.bashrc
This will source your bashrc and apply whatever is set there to the
currently running shell...
Arun wrote:
Hi,
have a problem running ant script as a cronjob. The cron tells
BUILD FAILED
/home/build/mobchannel/mobchannelWEB/build.xml:230:
/home/build/mobchannel/mobchannelWEB/${env.CATALINA_HOME}/bin not found.
But when I directly execute the build.xml using ant this error does not
occur.
<property environment="env" />
<property name="tomcat.home" value="${env.CATALINA_HOME}" />
<property name="webapp.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="${
java.home}/../lib/tools.jar"
/>
<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
job.
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.
--
Scot P. Floess
27 Lake Royale
Louisburg, NC 27549
252-478-8087 (Home)
919-754-4592 (Work)
Chief Architect JPlate http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]