简体   繁体   中英

Building a war on intellij

I have a Java EE project I have imported into IntelliJ . I can compile the project but for some reason not able to build a war artifact , when I go to the build tab the <build artifacts> option is blanked out ( ie I cannot select it ) . my project compiles fine but I am still confused on how I could build my war .

Operating sequence can be such (dependent of IDE version):

Choose:

File -> Project Structure -> Artifacts

Then press Alt + Insert and create new artifact:

在此处输入图片说明

After this actions item Build artifacts should be available.

If you are using the IntelliJ Community Edition with Gradle, try this:

  1. Add the 'war' plugin to your build.gradle file:

    plugins { ... id("war") ... }

  2. In your Gradle window, double click on [project]/Tasks/build/build

在此处输入图片说明

  1. Your WAR file will be in build/libs folder:

在此处输入图片说明

source (and more detailed info): https://www.zoftino.com/developing-kotlin-applications-using-intellij-idea-and-gradle

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM