如何在eclipse中使用maven停止tomcat 7 [英] How to stop tomcat 7 with maven in eclipse

查看:402
本文介绍了如何在eclipse中使用maven停止tomcat 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在eclipse中运行我的maven web项目时。我转到 pom.xml ,右键单击该文件和
1. Maven Clean

2.构建资源

3. Maven Build ..

When I run my maven web project in eclipse. I go to pom.xml, right click on the file and
1. Maven Clean
2. Build Resources
3. Maven Build ..

然后我输入 tomcat7:运行(对于tomcat 7)对于tomcat 6, tomcat:在eclipse的tomcat目标字段中运行。它刚刚开始。但是我想知道怎么样?
1.要阻止它
2.重建资源并重新部署

Then I type tomcat7:run (for tomcat 7) for tomcat 6 , tomcat:run in the tomcat goals field in eclipse . It just starts. But I want to know how
1. To stop it
2. Rebuild the source and redeploy

在elipse中或任何其他快速简单的步骤。是不是有办法做所有的东西来启动tomcat而不是在eclipse中重复前面说的步骤(maven clean ..构建资源..再次输入tomcat7:run ...)。

in elipse or any other quick easy step. Isn't there any way to do all stuff to start the tomcat instead of repeating fore said steps(maven clean.. building resource.. again type tomcat7:run ... ) in eclipse.

推荐答案

你能尝试右键单击pom.xml> Run As> Maven Build ...
在目标部分定义所有命令,类似于:clean install tomcat7:run

Can you try right click on pom.xml > Run As > Maven Build... Define here in the Goals section all your commands, something like: clean install tomcat7:run

我的建议是检查跳过测试以获得更快的启动时间,你可以添加额外的参数,如需要的-Denvironment = qa或VM参数(来自JRE选项卡)例如-Xmx2048m -Xms256m

My recommendation is to check skip tests for faster start up time, you can add extra paramenters like -Denvironment=qa if needed or VM arguments (from the JRE tab) like -Xmx2048m -Xms256m

此外,为配置添加一个名称,因为您只需单击一下就能再次运行它,或者您可以复制.launch文件eclipse生成到你的应用程序并提交它。

Also, put a name to the configuration since you will be able to Run it again with a simple click or you could copy the .launch file eclipse generates into your application and commit it.

要停止服务器,只需从控制台视图中单击红色方块。

To stop the server just click the red square from the console view.

希望有所帮助。

这篇关于如何在eclipse中使用maven停止tomcat 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆