3 Feb 23:57
Run with tomcat7
I am trying to run an existing application using cargo ant.
The example given on the page http://cargo.codehaus.org/Ant+support
deletes the resulting exploded war, then creates a tomcat installation in the target dir. Therefore I am unable to see the application.
<property name="tomcat.home" value="/opt/tomcat"/>
<property name="tomcatlog.dir" value="target"/>
<property name="tomcatconfig.dir" value="target/tomcat"/>
<property name="mywarfile" value="target/webapps/myWebapp"/>
<taskdef resource="cargo.tasks">
<classpath>
<fileset dir="cargo">
<include name="**/*.jar"/>
</fileset>
</classpath>
</taskdef>
<target name="cargostart" depends="war">
<delete dir="${tomcatconfig.dir}" />
<mkdir dir="${tomcatlog.dir}"/>
<mkdir dir="${tomcatconfig.dir}"/>
<echo message="Starting Cargo..."/>
<echo message="Using tomcat.home = ${tomcat.home} "/>
<echo message="Using war = ${mywarfile} "/>
<!-- <echo message="Jars used = ${cargo-uberjar} , ${cargo-antjar}"/> -->
<cargo containerId="tomcat7x" home="${tomcat.home}" output="${tomcatlog.dir}/output.log"
log="${tomcatlog.dir}/cargo.log" action="run">
<configuration home="${tomcatconfig.dir}">
<property name="cargo.servlet.port" value="8080"/>
<property name="cargo.logging" value="low"/>
<deployable type="war" file="${mywarfile}"/>
</configuration>
</cargo>
</target>
Should I generate the war after I start tomcat, or there's something I am missing ?
The example given on the page http://cargo.codehaus.org/Ant+support
deletes the resulting exploded war, then creates a tomcat installation in the target dir. Therefore I am unable to see the application.
<property name="tomcat.home" value="/opt/tomcat"/>
<property name="tomcatlog.dir" value="target"/>
<property name="tomcatconfig.dir" value="target/tomcat"/>
<property name="mywarfile" value="target/webapps/myWebapp"/>
<taskdef resource="cargo.tasks">
<classpath>
<fileset dir="cargo">
<include name="**/*.jar"/>
</fileset>
</classpath>
</taskdef>
<target name="cargostart" depends="war">
<delete dir="${tomcatconfig.dir}" />
<mkdir dir="${tomcatlog.dir}"/>
<mkdir dir="${tomcatconfig.dir}"/>
<echo message="Starting Cargo..."/>
<echo message="Using tomcat.home = ${tomcat.home} "/>
<echo message="Using war = ${mywarfile} "/>
<!-- <echo message="Jars used = ${cargo-uberjar} , ${cargo-antjar}"/> -->
<cargo containerId="tomcat7x" home="${tomcat.home}" output="${tomcatlog.dir}/output.log"
log="${tomcatlog.dir}/cargo.log" action="run">
<configuration home="${tomcatconfig.dir}">
<property name="cargo.servlet.port" value="8080"/>
<property name="cargo.logging" value="low"/>
<deployable type="war" file="${mywarfile}"/>
</configuration>
</cargo>
</target>
Should I generate the war after I start tomcat, or there's something I am missing ?
RSS Feed