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?

  1. do maven build compile scope large jars
  2. 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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -