问题描述
限时送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:关键词]
发布评论