Developers, Developers, Developers! Maksim Sorokin IT Blog


IzPack: Installing Only When Version Was Changed

This post describes a concept of updating a product only when a Maven version of it was changed.

Assume you have a product A, installable by IzPack and built by Maven. When you install product A, you may use RegistryInstallerListener to add entry to the registry. In RegistrySpec.xml (where you provide target key where to store information) you use Maven ${project.version} property. Therefore, when the product A will be installed, the Maven version will be stored in the Registry. Next time you install product A you use read that entry from a registry (here I describe how to do that in IzPack 4. This is out-of-the-box in IzPack 5) and then compare the Maven versions (you may use this post information to create a Maven panel) and determine, whereas to install/update a product.

Product A may also be independent installer, launched from another installer. For instance, if product A installer requires administrative rights, and it is included from product B, which doesn' require administrative right, you would like to avoid UAC as much as possible. So from product B you can check version of product A and determine, whereas you need to launch it.

Comments (0) Trackbacks (0)

Sorry, the comment form is closed at this time.

Trackbacks are disabled.