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?
CodePudding user response:
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.