maven tomcat插件还是cargo插件?
spring源代码示例使用maven tomcat插件,我可以使用命令mvn tomcat:run
运行这些项目,但我没有看到应用程序未部署在本地tomcat服务器中(“C:\ apache tomcat\webapps\")..
它与货物插件有何不同? (在这种情况下,当我运行命令mvn Cargo:redeploy
时,我看到应用程序部署在位置“C:\ apache tomcat \ webapps \”)
如果我将Cargo插件添加到Spring的POM中例子(如 mvn-showcase、petclinic)..它会把事情搞砸吗?
The spring source code examples use maven tomcat plugin and i am able to run these projects using the command mvn tomcat:run
but what i dont see the application is not deployed in local tomcat server("C:\apache tomcat\webapps\")..
And how it is different from cargo plugin? (In this case when i ran the command mvn cargo:redeploy
, i see the application deployed in the location "C:\apache tomcat\webapps\")
If i add cargo plugin to the POM of spring examples (like mvn-showcase,petclinic)..will it screw up the things?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
命令
tomcat:run
启动一个嵌入式 Tomcat,它不会将应用程序部署到本地 Tomcat(为什么这很重要?)。Cargo 是一个与容器无关的工具,因此您可以将其配置为使用远程容器、本地安装的容器、嵌入式容器(只要为给定容器提供实现),并且仍然使用统一的 API(或命令集)。
Cargo 不支持运行 Tomcat+6.x 处于嵌入模式。因此,您很可能将其与本地安装的容器一起使用,并且您的应用程序物理部署在其上。
它不会搞砸任何事情,为什么会这样。
The command
tomcat:run
starts an embedded Tomcat, it doesn't deploy an application to your local Tomcat (why does it matter anyway?).Cargo is a container agnostic tool so you could configure it to use a remote container, a locally installed container, an embedded container (as long as implementations are provided for a given container) and still use an unified API (or set of commands).
Cargo doesn't support running Tomcat+6.x in embedded mode. So you are very likely using it with a locally installed container and your app gets physically deployed on it.
It won't screw up anything, why would it.
您可以使用 tomcat maven 插件并将其部署到外部 tomcat 服务器。
请参阅此链接了解所有内容可用的目标。 tomcat-run 将启动嵌入式服务器,但 tomcat:deploy 适用于外部 tomcat。
You can use tomcat maven plugin and deploy it to external tomcat server.
see this link for all the available goals. tomcat-run will start a embedded server but tomcat:deploy works for external tomcat.