maven tomcat插件还是cargo插件?

发布于 2024-09-25 01:57:30 字数 319 浏览 1 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

俏︾媚 2024-10-02 01:57:30

Spring 源代码示例使用 maven tomcat 插件,我可以使用命令 mvn tomcat:run 运行这些项目,但我没有看到应用程序未部署在本地 tomcat 服务器中(“C:\apache tomcat\webapps \")

命令 tomcat:run 启动一个嵌入式 Tomcat,它不会将应用程序部署到本地 Tomcat(为什么这很重要?)。

它与货物插件有何不同?

Cargo 是一个与容器无关的工具,因此您可以将其配置为使用远程容器、本地安装的容器、嵌入式容器(只要为给定容器提供实现),并且仍然使用统一的 API(或命令集)。

在这种情况下,当我运行命令 mvn Cargo:redeploy 时,我看到应用程序部署在位置“C:\apache tomcat\webapps\”

Cargo 不支持运行 Tomcat+6.x 处于嵌入模式。因此,您很可能将其与本地安装的容器一起使用,并且您的应用程序物理部署在其上。

如果我将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\")

The command tomcat:run starts an embedded Tomcat, it doesn't deploy an application to your local Tomcat (why does it matter anyway?).

And how it is different from cargo plugin?

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).

In this case when I ran the command mvn cargo:redeploy, I see the application deployed in the location "C:\apache tomcat\webapps\"

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.

If i add cargo plugin to the POM of spring examples (like mvn-showcase,petclinic)..will it screw up the things?

It won't screw up anything, why would it.

巴黎盛开的樱花 2024-10-02 01:57:30

您可以使用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文