通过 IntelliJ Idea 在 Tomcat 中部署外部战争

编程入门 行业动态 更新时间:2024-10-08 10:54:15
本文介绍了通过 IntelliJ Idea 在 Tomcat 中部署外部战争的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我有一个项目依赖于部署到 Tomcat 的两个 war 文件.所以每次我想测试它时,我需要构建一个工件并手动将它部署在两个wars旁边.有没有办法以某种方式将这些 war 文件 添加到我的 Idea 项目中,以便可以通过按 Shift+F10 自动部署它们.

I have a project that is dependent on two war files being deployed to Tomcat. So every time I want to test it, I need to build an artifact and manually deploy it alongside the two wars. Is there a way to somehow add those war files to my Idea project so they can be deployed automatically by pressing Shift+F10.

我会手动部署它,但我有几个人在做这个项目,这会大大简化沟通.

I would deploy it manually, but I have several people working on the project and it would greatly simplify the communication.

战争是外部的,它们没有来源,所以从它们的来源中创建新的模块/工件是不可能的.

Wars are external and they have no sources, so creating new modules/artifacts out of their source is out of the question.

你能帮我吗?

推荐答案

由于已接受答案上的链接已失效,这里是步骤(我正在使用 Intellij 14):

Since the link on the accepted answer is dead, here is the process, step by step (I'm using Intellij 14):

1) 选择运行/编辑配置

2) 如果还没有Tomcat Run Config,则创建一个

2) If no Tomcat Run Config exists yet, create one

3) 选择刚刚创建的 Tomcat 运行配置,在 Deployment 选项卡上,在 Deploy at server startup 部分下,单击+"(右侧边栏),选择 外部源,然后选择您的war文件.

3) Select the Tomcat run config just created, on Deployment tab, under Deploy at server startup section, click the "+" (right sidebar), select External source, and select your war file.

这篇关于通过 IntelliJ Idea 在 Tomcat 中部署外部战争的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 04:11:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1388940.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:战争   IntelliJ   Idea   Tomcat

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!