I use the following ANT script to run tomcat:
<macrodef name="start-tomcat"> <sequential> <exec executable="/bin/sh" > <arg value="-c" /> <arg value='${tomcat.bin.dir}/startup.sh -Xms128M -Xmx512M' /> </exec> </sequential> </macrodef>
when I run the tomcat script from the shell, tomcat starts normally, and I see this output:
Using CATALINA_BASE: /u/app Using CATALINA_HOME: /u/app/3rdparty/apache-tomcat-6.0.33 Using CATALINA_TMPDIR: /u/app/temp Using JRE_HOME: /usr/java/jre1.6.0_13 Using CLASSPATH: /u/app/3rdparty/apache-tomcat-6.0.33/bin/bootstrap.jar
I have two problems:
- How can I tell ANT to show me the output as above? ANT only shows output when there is an error.
- When I run the build.xml file from the shell with the ANT executable tomcat, it starts. when you run the build file through the CI server - in particular, Jenkins (Hudson) tomcat does NOT start.
I find it difficult to understand how to use the <exec> task to run shell scripts, is there something I am doing wrong?
Thanks.
source share