spring - How to reduce the size of ear file -
the size of ear file has reached around 100 mb after adding many exetrnal jars.
environment : java spring/websphere application server/maven
please share tips reduce size of ear file.
seems exteral jars contribute large size. possible follow approach below, if how that?
- do maven build compile scope large jars
- keep large sized jars in app server lib, app take these jars @ runtime appserver?
thanks smitha
you should review jars, poorly done maven builds add lot of unnecessary jars application (like jta, servlet, jee-api, etc..), make sure don't have them. jars duplicated in every web module have in ear.
second websphere java ee 6 server, provides lots of common features jax-ws, jax-rs, jpa, etc..., should consider using them, before throwing third party libraries in application.
if want use shared library approach, do not put jars in server lib
folder or server classpath. not recommended.
create shared library via environment > shared libraries
see here , assign them application.
Comments
Post a Comment