Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
223 views
in Technique[技术] by (71.8m points)

java - How to create and deploy war in Intellij

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

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.

Thanks

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.

After building manifest, click apply->Ok.

Now you can go to Build-> Build Artifact.

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...