简体   繁体   中英

Building a war with dependencies in an external lib folder

My war file gets really big and I would like to build it as I do for jars: packaging dependencies in a lib folder outside the war, so as to keep the war small in size. Transfer time to my server will be much improved.

I have not found a question on SA addressing this specific issue. I wonder:

  • is it technically possible, or is there something in Jakarta EE which forbids this way to pack dependencies?
  • if possible, is there a Maven plugin for it?

Jakarta EE is using a concept of installed library mechanism. Installed libraries are visible to all WAR files.

More details you can find here .

So, you can move all the JARs that are not part of your source code like Spring, Hibernate, etc. to Jakarta installed libraries and deploy a much light-weight WARs.

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