You will be having files related to your each ext plugin under following places
Suppose for example i have created a ext plugin named "second"
1) You will be having some jars @ temp folder of your tomcat instance @
In my case,
D:\projects\liferay\rNd\liferay-portal-6.0.5\tomcat-6.0.26\temp\liferay\com\liferay\portal\deploy\dependencies\ext-second-ext-util-bridges.jar
D:\projects\liferay\rNd\liferay-portal-6.0.5\tomcat-6.0.26\temp\liferay\com\liferay\portal\deploy\dependencies\ext-second-ext-util-taglib.jar
D:\projects\liferay\rNd\liferay-portal-6.0.5\tomcat-6.0.26\temp\liferay\com\liferay\portal\deploy\dependencies\ext-second-ext-util-java.jar
2) You will be having jars related to each of your ext plugin @
In my case,
D:\projects\liferay\rNd\liferay-portal-6.0.5\tomcat-6.0.26\webapps\ROOT\WEB-INF\lib\ext-second-ext-util-bridges.jar
D:\projects\liferay\rNd\liferay-portal-6.0.5\tomcat-6.0.26\webapps\ROOT\WEB-INF\lib\ext-second-ext-util-taglib.jar
D:\projects\liferay\rNd\liferay-portal-6.0.5\tomcat-6.0.26\webapps\ROOT\WEB-INF\lib\ext-second-ext-util-java.jar
D:\projects\liferay\rNd\liferay-portal-6.0.5\tomcat-6.0.26\webapps\ROOT\WEB-INF\lib\ext-second-ext-impl.jar
3) xml file related to each ext plugin will be placed @
In my case,
D:\projects\liferay\rNd\liferay-portal-6.0.5\tomcat-6.0.26\webapps\ROOT\WEB-INF\ext-second-ext.xml
4) Service file @ global class path of app server -
D:\projects\liferay\rNd\liferay-portal-6.0.5\tomcat-6.0.26\lib\ext\ext-second-ext-service.jar
5) Once your ext plugin is deployed properly you may see some message some thing like below
[ExtHotDeployListener:188] Extension environment for "YOUR_EXT_PLUGIN_NAME" has been applied. You must reboot the server and redeploy all other plugin
s.
Copy the below code to a bat file, change tomcat_home according to your tomcat instance
> you need to send your ext plugin name as parameter , in my case "second"
> before redeploying stop the server & run the following command then redeploy
@echo offPlease post your comments/feedback/suggestions on this topic if possible
set app_name=%1
if "%app_name%" == "" goto end
set tomcat_home=E:\Liferay605\bundles\tomcat-6.0.26
rmdir /S /Q %tomcat_home%\webapps\%app_name%-ext
del /S /Q %tomcat_home%\lib\ext\ext-%app_name%-ext-service.jar
del /S /Q %tomcat_home%\webapps\ROOT\WEB-INF\lib\ext-%app_name%-ext-util-bridges.jar
del /S /Q %tomcat_home%\webapps\ROOT\WEB-INF\lib\ext-%app_name%-ext-util-taglib.jar
del /S /Q %tomcat_home%\webapps\ROOT\WEB-INF\lib\ext-%app_name%-ext-util-java.jar
del /S /Q %tomcat_home%\webapps\ROOT\WEB-INF\lib\ext-%app_name%-ext-impl.jar
del /S /Q %tomcat_home%\webapps\ROOT\WEB-INF\ext-%app_name%-ext.xml
del /S /Q %tomcat_home%\temp\liferay\com\liferay\portal\deploy\dependencies\ext-%app_name%-ext-util-bridges.jar
del /S /Q %tomcat_home%\temp\liferay\com\liferay\portal\deploy\dependencies\ext-%app_name%-ext-util-taglib.jar
del /S /Q %tomcat_home%\temp\liferay\com\liferay\portal\deploy\dependencies\ext-%app_name%-ext-util-java.jar
:end
Thanks for explanations, Nagendra! This cleans-up things a bit. Will try and report how well this works.
ReplyDeleteOne possible suggestion I just thought about: its possible to modify EXT plugin build.xml to run "undeploy" task prior to deploy, since there is complete config about Tomcat (or other server) location present in parent build.xml! Doing so may make deployment/undeployment of EXT plugin quite transparent thing I think :)
Even i thought about that, one problem i found was we will have service related jar of ext plugin(s) in global class path of the server (tomcat or any other)which cannot be loaded/applied without restarting the server.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteAnyway it's way better then redeploying ENTIRE Liferay Portal and re-applying EXT plugin after that. My ANT task works like charm, but 2 server restarts required in order to make EXT plugin active... Unfortunately, Liferay Plugin SDK isn't mature enough yet...
ReplyDeleteYou are right ext plugins are not mature enough, it will take some time to come to certain level maturity.
ReplyDeleteI can say ext plugins are not hot deployable as of now (It depends on what changes we have made even)
We have problem if we try to deploy more than one ext plugin in Liferay 6.0.5,it is not able to merge ext related configuration files under ROOT\WEB-INF\ of tomcat deployment directory.
I share your pain.
ReplyDeleteExt Plugin isn't right now what it could be - I'm trying to be patient.
If you are hungry for more info try to look at:
http://www.liferay.com/community/wiki/-/wiki/Main/Ext+Plugin
-- tom
Thomas, Thank you very much for details & link :)
ReplyDeleteHere is the link to patch for redeploy problems
ReplyDeletehttp://issues.liferay.com/browse/LPS-14221
Thanks Nagendra ...
ReplyDeleteI've faced one another problem while using plugins-ext.
When i removed the plugins-ext jar files created in tomcat/webapps/ROOT/WEB-INF/lib and when i redeploy it didn't copy all those jars again after restaring the server.
Then i've found somewhere we've one ant task for ext-plugins that is "direct-deploy". When i've used it, jar files started copied using this ant target.
Not sure what is the problem with deployment or i am doing anything wrong. But "direct-deploy" works for me.
-
Tejas
If you have any custom classes in ext plugin then there is problem with loading on first start of the server. JSP files its not a problem. Direct deploy i hope will work in that case
ReplyDeleteHi everybody and thanks Nagendra for this topic.
ReplyDeleteI have the same problem as TEJ. When I use direct deploy, I have all my jars copied to the WEB-INF/lib folder of my liferay instance, but I'd like to deploy the ext plugin on another server different from my development server. And when I just use the hot deploy it doesn't copy those jars, so I have to do it manually.
Is it an issue or am I missing something?
Thanks everybody for your answers.
Alex, redeployment is handled entirely in a different way when it comes to Ext plugins. Here is some notes from liferay doucumentation
ReplyDeleteThe direct-deploy target is faster because the changes are applied directly., while the Liferay server does it on start up if you use the deploy target. For that reason it is usually preferred during development.
Check this for more info, http://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/developing-an-ext-plugin