Message Boards

6.2 to DXP 7.1- Maven based Plugin Portlet Migrate using Code Upgrade Tool

thumbnail
kartik shiroya, modified 5 Years ago.

6.2 to DXP 7.1- Maven based Plugin Portlet Migrate using Code Upgrade Tool

Junior Member Posts: 47 Join Date: 12/29/14 Recent Posts
Hello Folk,

I have Migrated Maven based Plugin Portlet using Code Upgrade Tool from 6.2 to 7.1 , all things are migrated successfully but portletId is different in 7.1

Fox ex in 6.2 portleid in p_portlettest_WAR_portlettest001SNAPSHOT and in DXP 7.1 p_portlettest_WAR_portlettest (without post fix of portlet version) because of this issue in liferay insert new entry in portlet table, So old portlet on old page shwoing message:"This portlet has been undeployed. Please redeploy it or remove it from the page"

Is there any solution for it like both portletIdshould be same so it will ovveride portlet table row, Or I missed anything while migrating?

Thanks in Adavnce

Regards,
Kartik

thumbnail
David H Nebinger, modified 5 Years ago.

RE: 6.2 to DXP 7.1- Maven based Plugin Portlet Migrate using Code Upgrade T

Liferay Legend Posts: 14914 Join Date: 9/2/06 Recent Posts
Portlet IDs do change as a result of the migration to OSGi.

Normally I suggest building an upgrade process for this, Liferay has examples of how to update the portlet ID in the database as part of the deployment. It's a one time thing you have to code for the migration, but it will make your life easier if you can switch to the new id rather than trying to keep the old one.
​​​​​​​
thumbnail
kartik shiroya, modified 5 Years ago.

RE: 6.2 to DXP 7.1- Maven based Plugin Portlet Migrate using Code Upgrade T

Junior Member Posts: 47 Join Date: 12/29/14 Recent Posts
Thanks, David for a quick reply,

But My portlet is spring base maven building portlet and when I migrate it is not converted to gradle project(module) structure.
My migrated plugin still generating war file as liferay legacy worked.


One more thing how can building an upgrade process from 6.2 to DXP 7.1 ?
​​​​​​​

Note: I migrated this plugin from the Liferay IDE code upgrade tool.

Regards,
Kartik 
thumbnail
David H Nebinger, modified 5 Years ago.

RE: 6.2 to DXP 7.1- Maven based Plugin Portlet Migrate using Code Upgrade T

Liferay Legend Posts: 14914 Join Date: 9/2/06 Recent Posts
So even though you're building a Spring portlet war, it will eventually be bundled as an OSGi module and therefore have access to the OSGi services.

Use provided scope for your OSGi dependencies, then start creating classes and decorating them with @Component and @Reference as necessary.

So you can add upgrade processes into your spring portlet war project following the documentation from dev.liferay.com and everything should just work when deployed.

Keep in mind, however, that Spring doesn't handle OSGi references and OSGi does not handle Spring references; when you need to provide access between them, there are several tricks to follow including using ServiceTrackers on Spring or use static util classes from OSGi components.