`
Arron.li
  • 浏览: 134284 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

ant启动和关闭tomcat

阅读更多

1.ant 直接启动tomcat,build.xml配置

1.1启动tomcat

注意tomcat.home是你的tomcat的安装路径

		<target name="start-tomcat" description="tomcat starting.....">
        <exec executable="${tomcat.home}/bin/startup.bat" spawn="true" vmlauncher="false">
        <env key="CATALINA_HOME" value="${tomcat.home}" />
        <arg line="/c start ${tomcat.home}/bin/startup.bat" />
      </exec>		
   </target>
 

 1.2关闭tomcat

		<target name="tomcat.stop">
		<java jar="${tomcat.home}/bin/bootstrap.jar" fork="true">
		<jvmarg value="-Dcatalina.home=${tomcat.home}"/>
		<arg line="stop"/>
		</java>
		<waitfor maxwait="5" maxwaitunit="second">
        <available file="errors.log"/>
		</waitfor>

		</target>
 
2
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics