如何用ant来启动和停止tomcat以运行web项目
2011-12-18 13:11
429 查看
<project name= "BULLETIN_BOARD" default= "tomcat-start" basedir= "." >
<property name= "source.encoding" value= "Windows-31J" />
<property environment= "env" />
<property name= "source.dir" value= "./" />
<property name= "tomcat.home" value= "C://tomcat6.0" />
<property name= "target.dir" value= "${tomcat.home}/webapps/kotaiSystem" />
<property name= "class.dir" value= "${target.dir}/WEB-INF/classes" />
<target name= "prepare" >
<mkdir dir= "${target.dir}" />
<mkdir dir= "${target.dir}/css" />
<mkdir dir= "${target.dir}/js" />
<mkdir dir= "${target.dir}/jsp" />
<mkdir dir= "${target.dir}/WEB-INF" />
<mkdir dir= "${target.dir}/WEB-INF/lib" />
<mkdir dir= "${class.dir}" />
<copy todir= "${target.dir}" >
<fileset dir= "${source.dir}" includes= "index.jsp" />
</copy>
<copy todir= "${target.dir}/css" >
<fileset dir= "${source.dir}/css" />
</copy>
<copy todir= "${target.dir}/js" >
<fileset dir= "${source.dir}/js" />
</copy>
<copy todir= "${target.dir}/jsp" >
<fileset dir= "${source.dir}/jsp" />
</copy>
<copy todir= "${target.dir}/WEB-INF" >
<fileset dir= "${source.dir}/WEB-INF" />
</copy>
<copy todir= "${target.dir}/WEB-INF/lib" >
<fileset dir= "${source.dir}/WEB-INF/lib" />
</copy>
</target>
<target name= "clean" >
<delete dir= "${target.dir}" />
<delete dir= "${tomcat.home}/work" />
</target>
<target name= "compile" depends= "prepare" >
<javac encoding= "${source.encoding}" srcdir= "${source.dir}/WEB-INF/src"
destdir= "${class.dir}"
debug= "on" optimize= "off" deprecation= "off" >
<classpath>
<pathelement path= "${class.dir}" />
<fileset dir= "${source.dir}/WEB-INF/lib" includes= "*.jar" />
</classpath>
</javac>
</target>
</project>
<property name= "source.encoding" value= "Windows-31J" />
<property environment= "env" />
<property name= "source.dir" value= "./" />
<property name= "tomcat.home" value= "C://tomcat6.0" />
<property name= "target.dir" value= "${tomcat.home}/webapps/kotaiSystem" />
<property name= "class.dir" value= "${target.dir}/WEB-INF/classes" />
<target name= "prepare" >
<mkdir dir= "${target.dir}" />
<mkdir dir= "${target.dir}/css" />
<mkdir dir= "${target.dir}/js" />
<mkdir dir= "${target.dir}/jsp" />
<mkdir dir= "${target.dir}/WEB-INF" />
<mkdir dir= "${target.dir}/WEB-INF/lib" />
<mkdir dir= "${class.dir}" />
<copy todir= "${target.dir}" >
<fileset dir= "${source.dir}" includes= "index.jsp" />
</copy>
<copy todir= "${target.dir}/css" >
<fileset dir= "${source.dir}/css" />
</copy>
<copy todir= "${target.dir}/js" >
<fileset dir= "${source.dir}/js" />
</copy>
<copy todir= "${target.dir}/jsp" >
<fileset dir= "${source.dir}/jsp" />
</copy>
<copy todir= "${target.dir}/WEB-INF" >
<fileset dir= "${source.dir}/WEB-INF" />
</copy>
<copy todir= "${target.dir}/WEB-INF/lib" >
<fileset dir= "${source.dir}/WEB-INF/lib" />
</copy>
</target>
<target name= "clean" >
<delete dir= "${target.dir}" />
<delete dir= "${tomcat.home}/work" />
</target>
<target name= "compile" depends= "prepare" >
<javac encoding= "${source.encoding}" srcdir= "${source.dir}/WEB-INF/src"
destdir= "${class.dir}"
debug= "on" optimize= "off" deprecation= "off" >
<classpath>
<pathelement path= "${class.dir}" />
<fileset dir= "${source.dir}/WEB-INF/lib" includes= "*.jar" />
</classpath>
</javac>
</target>
</project>
相关文章推荐
- Idea在Mac上如何同时启动多个tomcat运行多个web项目
- maven项目如何启动运行---发布到tomcat中
- Tomcat中如何运行web项目
- Intellij IDEA如何使用Maven Tomcat Plugin运行web项目
- maven web项目的tomcat启动,运行,调试问题
- Intellij IDEA如何使用Maven Tomcat Plugin运行web项目
- maven项目如何启动运行---发布到tomcat中
- 使用Ant构建web项目 从编译到测试 生成测试报告 打包 邮件发送 远程下载tomcat 部署运行一条龙服务之ant脚本
- eclipse如何配置tomcat运行web项目时省略项目名称
- maven项目如何启动运行---发布到tomcat中
- Intellij IDEA如何使用Maven Tomcat Plugin运行web项目
- 关于Eclipse部署web项目到tomcat插件,启动成功但运行报错org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(Lja
- 关于eclipse 运行了 maven install后 在tomcat中启动web项目出现classnofind的异常解决方法
- Intellij IDEA如何使用Maven Tomcat Plugin运行web项目
- MyEclipse使用总结——Maven项目如何启动运行发布到tomcat中[转]
- Intellij IDEA如何使用Maven Tomcat Plugin运行web项目(转)
- eclipse_j2ee运行web项目如何发布到Tomcat
- Idea中如何将web项目打包成war包并放到tomcat中启动
- Intellij IDEA 创建Web项目并在Tomcat中部署运行
- IDEA集合maven项目与Tomcat如何运行(转载)