Howto Manual Hot Deploy for Liferay

Steps for getting manual hot-deploy for Liferay:

  1. Set developer mode to active by adding -Dexternal-properties=portal-developer.properties in file setenv.sh (or setenv.bat on Windows) located in Liferay’s bundled Tomcat bin directory.
  2. For CSS:
    1. Copy the CSS files (which should preferably be in the same directory, eg. CSS) to a directory with the same name to the following paths:
    • ${liferay.tomcat}/webapps/${app.folder}/css
    • ${liferay.tomcat}/webapps/${app.folder}/css/.sass_cache
    • ${liferay.tomcat}/temp/${app.temp.folder}/css
    • ${liferay.tomcat}/temp/${app.temp.folder}/css/.sass_cache
    • Please note that if ${app.folder} is for example my-app, ${app.temp.folder} usually has the same name prefixed by a number, eg. 10-my-app.
    1. Remove ${liferay.tomcat}/work/Catalina/localhost/${app.folder} dir.
    2. When reloading the page, Liferay will load the necessary files on the work directory and so the new styles will be used without the need to generate and deploy a new war.
  3. The same process can be used for jsp files ommiting the step for the .sass_cache dir.