If you are upgrading your LR plugin portlet from any LR version to any other version then you can use below steps / suggestion .
1) Create a new portlet in LR X.X using this command. ./create.bat portletName “PortletDisplayName”.
2) Copy and paste All the configuration file from old plugin portlet-->docroot>Web-INF
(ie. web.xml ,service.xml portlet.xml,liferay-portlet.xml,liferay-display.xml and liferay-plugin-package.properties file) to new plugin portlet.
Do required changes in every xml if required. i.e if you have make entry for dependecy jar into liferay-plugin-package.properties it may possible that name of old jars might have changes.
For example jstl.jar in Liferay 5.2SP3 is now changed to jstl-api.jar in Liferay 6.1 tomcat 7.0
3) Build services inside new plugin portlet.
4) Place your custom for services inside portletNameLocalServiceImpl.java and again build services of your new portlet.
5) Copy all JSP , JS , Images and CSS from old plugin portlet into appropriate folder of new plugin portlet.
6) Copy all your custom Java code (Other then service files as we have already builded service in above steps for new plugin portlet) from your old plugin portlet to new plugin portlet.
7) Add required files in build path if its your first plugin portlet in a fresh bundle. Like util-java.jar , util-bridge.jar , portlet.jar and portlet-service.jar .Ignore this step if all this files already avilable in build-path.
8) Remove all existing imports from the java classes.
9) One by one include all required java classes.
10) If there is any changes in New APIs then do required changes.
11) Same way for JSPs . Remove all your existing imports and try by importing them again.
1) Create a new portlet in LR X.X using this command. ./create.bat portletName “PortletDisplayName”.
2) Copy and paste All the configuration file from old plugin portlet-->docroot>Web-INF
(ie. web.xml ,service.xml portlet.xml,liferay-portlet.xml,liferay-display.xml and liferay-plugin-package.properties file) to new plugin portlet.
Do required changes in every xml if required. i.e if you have make entry for dependecy jar into liferay-plugin-package.properties it may possible that name of old jars might have changes.
For example jstl.jar in Liferay 5.2SP3 is now changed to jstl-api.jar in Liferay 6.1 tomcat 7.0
3) Build services inside new plugin portlet.
4) Place your custom for services inside portletNameLocalServiceImpl.java and again build services of your new portlet.
5) Copy all JSP , JS , Images and CSS from old plugin portlet into appropriate folder of new plugin portlet.
6) Copy all your custom Java code (Other then service files as we have already builded service in above steps for new plugin portlet) from your old plugin portlet to new plugin portlet.
7) Add required files in build path if its your first plugin portlet in a fresh bundle. Like util-java.jar , util-bridge.jar , portlet.jar and portlet-service.jar .Ignore this step if all this files already avilable in build-path.
8) Remove all existing imports from the java classes.
9) One by one include all required java classes.
10) If there is any changes in New APIs then do required changes.
11) Same way for JSPs . Remove all your existing imports and try by importing them again.
0 comments:
Post a Comment