1.打开pom.xml文件,添加

war 或 jar



2. 修改好之后打开maven栏
路径:View->Tool Windows->Maven
3.查看

4、注意:web项目需要打包成war包,jar包不打jsp和web.xml文件;