Liferay, Glassfish, Hot Deploy
Today I played around with the hotdeplyoment of a portlet into my Liferay server 5.3 which runs on top of Glassfish 2.1.
There are different documentations about this topic. But I run into the problem that my portlet (developed with Eclipse and Maven) was deployed but also immediately undeployed. The deployment process allways ends with a message like:
[#|2010-08-17T13:35:54.446+0200|INFO|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=17;_ThreadName=Timer-16;|
[AutoDeploy] Successfully autoundeployed : /opt/glassfish_v2ur2/domains/lportal/autodeploy/imixs-workflow-portlet-sample-0.0.4-SNAPSHOT.war.|#]
I did not know why, but the solution for me was to change the Deploy Directory configured in the liferay server from the Glassfish Autodeploy folder to a directory outside my glassfish/liferay server.
You can change the settings in the Plugin-Installer Portlet from liferay. I did not use the property file 'portal-ext.properties'!
After I changed the "Deploy Directory" and leave the "Destination Directory" blank, hot deployment works for me.
Ok I forget to explain how my portlet goes into my local autodeploy folder ;-)
I am developing my portlets with maven. So in my pom.xml I added the following maven-antrun-plugin which copies the portlet war into my autodeploy folder:
......
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>pre-integration-test</phase>
<configuration>
<tasks>
<echo message="About to copy plugin to autodeploydirectory..." />
<echo> Plugin:
${project.build.directory}/${project.build.finalName}.war
autodeploy directory: /home/rsoika/liferay_autodeploy </echo>
<copy
file="${project.build.directory}/${project.build.finalName}.war"
todir="/home/rsoika/liferay_autodeploy" />
<echo message="Copied to portletdeploy directory." />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
......
Posted at 09:17AM Aug 18, 2010
Posted by: Ralph
Category: General
Posted by Kyriacos on February 03, 2012 at 03:03 PM GMT #