如何在Intellij IDEA中复制maven依赖项以输出工件WEB-INF / lib? [英] How to copy maven Dependencies to ouput artifact WEB-INF/lib in Intellij IDEA?

查看:1031
本文介绍了如何在Intellij IDEA中复制maven依赖项以输出工件WEB-INF / lib?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道在eclipse中maven可以通过设置'部署程序集'和'构建路径'将依赖项复制到WEB-INF / lib目录,但是我怎样才能实现这一点Intellij IDEA?

I know in eclipse maven can copy dependencies to WEB-INF/lib dir by setting 'Deployment Assembly' and 'Build Path', but how can I achieve this with Intellij IDEA?

推荐答案

好的,我找到了解决方案:

Ok, I find a solution:

Intellij IDEA 中,Web应用程序存档( WAR )称为工件
您可以通过设置工件自动添加库:

In Intellij IDEA, a Web application archive (WAR) is called an artifact. And you can achieve adding libraries automatically by setting the artifact:


  • 打开项目结构设置窗口

  • 导航:项目设置 - >文物 - > **战争爆炸 - >输出布局 - > WEB-INF

  • 然后在WEB-INF下创建一个名为lib的目录,右键单击lib文件夹,你会看到 Add Copy of - 选项。

  • 选择库文件并添加所需的库。 [提示 Ctrl + A 可以在此处添加所有文件]

  • Open Project Structure setting window
  • Navigate:Project Settings --> Artifacts --> **war exploded --> Output Layout --> WEB-INF
  • Then create a directory named lib under WEB-INF, right click the lib folder, you will see Add Copy of- option.
  • Select Library Files and add the libraries you want. [Tips: Ctrl + A can work here to add all files]

这篇关于如何在Intellij IDEA中复制maven依赖项以输出工件WEB-INF / lib?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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