近使用idea运行maven需要打包上传tomcat服务器.但是网上一直零零碎碎的....自己记录一下.以防后面忘记

 

1、idea中.file →Project Structure(快捷键Ctrl+Shift+Alt+S)选择Artifacts,点击加号,选择WebApplication:Archive  Empty会生成一个空内容自由配置.默认第二个会自动配置

idea下maven项目打包

2、生成后在war包名称上重命名一下.否则默认XXXX_war.war,再将output directory选择你希望的war包导出地址

idea下maven项目打包

 

3、保存后build →buildartifacts 即根据需要生成对应的包.文件在output directory路径下.copy到tomcat的webapps目录下即可运行

idea下maven项目打包

 

相关文章:

  • 2021-11-18
  • 2021-06-15
  • 2021-08-04
  • 2021-06-09
  • 2022-01-16
  • 2022-12-23
  • 2021-08-12
猜你喜欢
  • 2022-02-05
  • 2021-04-10
  • 2021-04-15
  • 2021-08-24
  • 2021-12-17
  • 2021-12-06
  • 2022-12-23
相关资源
相似解决方案