Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to copy maven Dependencies to ouput artifact WEB-INF/lib in 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?

like image 965
qtopierw Avatar asked May 07 '16 03:05

qtopierw


1 Answers

Ok, I find a solution:

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

  • 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]
like image 185
qtopierw Avatar answered Nov 01 '22 07:11

qtopierw