Impressed with the small size of your Liberty install but wanting to make it even smaller? Looking at your Liberty install and wishing you could shave a few more megabytes off? Well now you can! Working to satisfy the unquenchable desire for an even smaller app server, the Liberty development team have created a new option when packaging Liberty – minify.

Impressed with the small size of your Liberty install but wanting to make it even smaller? Looking at your Liberty install and wishing you could shave a few more megabytes off? Well now you can! Working to satisfy the unquenchable desire for an even smaller app server, the Liberty development team have created a new option when packaging Liberty – minify.

What is minify?

Minify is an option you can set when repackaging a Liberty server. Instead of bundling the entire Liberty install, along with a user’s server configuration and applications, it will only package what you need (based on your server.xml configuration). The output from running minify against a server configuration is either a zip or a self extracting jar that contains everything (except java) that is needed to run your server on another machine making an app built with WAS Liberty very portable and even smaller!

How do I use minify?

  1. Stop your Liberty server
  2. Open a command prompt to the wlp/bin directory in your install
  3. Run the following command:

server package server_name --archive=package_file_name.jar --include=minify

There are several options around packaging a minified server – you can choose to produce a self-extracting jar or a zip file by changing the extension on the archive – “.jar” will produce the self-extracting jar and “.zip” will produce a zip file.

As minify does not include any unused features when it packages your server you will not be able to add features that are not in the minified version of the server, but you will be able to remove features you no longer need as before.

For more information around the minify options as well as other packaging options for your WAS Liberty server you can find more information in the WebSphere Liberty Information Center.

Join The Discussion

Your email address will not be published. Required fields are marked *