如何在Intellij中创建和部署战争 [英] How to create and deploy war in Intellij

查看:99
本文介绍了如何在Intellij中创建和部署战争的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的IntelliJ环境中有一个多模块项目.我只想为apache tomcat中的一个模块创建和部署war. (IntelliJ带有默认安装的tomcat.)

I have a multi-module project in my IntelliJ environment. I want to create and deploy war for only one module in apache tomcat. (IntelliJ comes with default installation of tomcat.)

我已经在Eclipse工作了将近四年,并在三天前开始使用IntelliJ.就像我们在eclipse中右键单击该项目并说导出为战争"并将其直接部署在我的应用服务器中一样,我可以在IntelliJ中做同样的事情吗?

I have worked almost four years with Eclipse and started with IntelliJ like three days back. Just the way we right click on the project in eclipse and say export as war and it directly deploys in my app server, can I do same / similar in IntelliJ?

任何帮助都会有所帮助.

Any help will be helpful.

谢谢

PS:问这个问题可能很愚蠢,但是mac/windows会有所作为吗?

PS : may be stupid to ask but would mac / windows make difference?

推荐答案

IntelliJ建立战争的过程不同:

IntelliJ has different process to build war:

转到->文件->项目结构->工件

Goto -> Files -> Project Structure -> Artifacts

在工件"选项卡中,您会在右上角看到一个小的+按钮. 单击它并填写右侧面板数据,例如名称和输出目录.

In artifacts tab, you will see a small + button on top right corner. Click it and fill up the right panel data such as name and output directory.

确保创建清单文件.保留清单文件的默认位置.

Make sure to create the Manifest file. Keep default location for Manifest file.

构建清单后,单击Apply-> Ok.

After building manifest, click apply->Ok.

现在,您可以转到Build-> Build Artifact.

Now you can go to Build-> Build Artifact.

您的.war文件将在您上面指定的输出文件夹中准备好.

Your .war file will be ready in the output folder you specified above.

这篇关于如何在Intellij中创建和部署战争的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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