Deploying a Plugin
Deploying to Glassfish
So, you make first a .war file let’s say a portlet of name <YOUR PLUGIN>.war. You wanna have it running on a glassfish domain under Liferay portal.
Steps to success:
- Navigate to Control Panel -> Plugins Installation on Liferay
- Hit Install new portlets
- Hit Configuration
- Fill in to Deploy Directory a new place for deployment let’s say
<YOUR DOMAIN>/autodeploy2 - Check that in the next line target is
<YOUR DOMAIN>/autodeploy(it is the Glassfish default deployment directory) - Hit Save
Now deployment will be done by copy pasting files to that new directory <YOUR DOMAIN>/autodeploy2. The rest of it is handled automatically. Setting takes action immediately.
Done with deployment: Make a victory jig and enjoy :)
..you stop dancing and face a bug. You want a new revision to be deployed.. In this case, continue reading.
So, you have built your war again and want to re-deploy. Do the following:
- undeploy old stuff from
<YOUR DOMAIN>/autodeployfolder by deleting the war file. Don’t delete any other file. - result is that
<YOUR PLUGIN>.war_UnDeployedfile will appear. - deploy new file by copying the newly built war in
<YOUR DOMAIN>/autodeploy2folder. - result is that
<YOUR PLUGIN>.war_deployedwill appear in<YOUR DOMAIN>/autodeployfolder.
Make a dance again :)