Liferay provides a way to update modules without modifying the original LPKG file they're packaged in. You can do this by overriding the LPKG file.
To override a JAR or WAR from any LPKG other than the Static LPKG,
1) first create a folder named
overridein the Liferay instance's
osgi/marketplacefolder. 2) Drop the updated JAR into this folder, making sure its name is the same as the JAR in the original LPKG, minus the version info. For example, if you want to override the
Liferay CE Amazon Rankings.lpkg, you would insert a JAR named
3) Overriding JARs from the Static LPKG works the same way, but the updated JARs go into the
osgi/staticfolder instead. For example, if you want to override the
com.liferay.portal.profile-1.0.3.jar, you would insert a JAR named
Note: To undo these changes, delete the overriding JAR; portal will use the original LPKG JAR on its next startup. Note that adding and removing JARs must be done while the portal is shut down. Changes take effect the next time the portal is started.
Source : https://github.com/liferay/liferay-portal/blob/master/tools/osgi-marketplace-override-README.markdown
I am sure this would come across someday when you would like to override LPKG files for small/large scale changes.