Fórumok

Liferay 6.2 Plugins SDK upgrade from 6.1 SDK

Traolly Xiong, módosítva 9 év-val korábban

Liferay 6.2 Plugins SDK upgrade from 6.1 SDK

Regular Member Bejegyzések: 195 Csatlakozás dátuma: 2011.12.30. Legújabb bejegyzések
Hello Community,
Any ideas on how to migrate existing 6.1 sdk plugins to the new 6.2 sdk?
I've attempted:

1) Overwrite the existing 6.1 sdk plugins with new 6.2 sdk. Opening an existing plugin failed in LR IDE. Creating an new portlet plugin
via the LR IDE or cmd both failed as well.

2) Attempted to just copy the plugins from 6.1 sdk to it's 6.2 sdk relative folder. Opening an existing plugin failed in LR IDE. Creating an new portlet plugin
via the LR IDE or cmd both failed as well.

Any one has any good tips on how to migrating / upgrading the plugins from 6.1 sdk to 6.2 sdk?

Thanks in advance.

Traolly Xiong
thumbnail
David H Nebinger, módosítva 9 év-val korábban

RE: Liferay 6.2 Plugins SDK upgrade from 6.1 SDK

Liferay Legend Bejegyzések: 14914 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Initially I suggest a slow path, keeping the 6.1 sdk as is and an initial 6.2 sdk set up and configured for your 6.2 bundle.

Then for each of your 6.1 plugins, create new plugins in 6.2 directory, then copy files from the old plugin to the new plugin (except for the liferay-plugin-package.properties and other xml files).

Then manually compare the old properties and xml and interleave your changes in. You have to be sure when you're doing this to add in the stuff your plugin needs without stripping out changes/additions that 6.2 introduces. For example, the liferay-plugin-package.properties files will all indicate that they are compatible w/ 6.2, so you certainly don't want to just overwrite w/ the version saying it is compatible with 6.1.

When that is done, then build a clean plugin. This should verify that the code at least on the surface is compatible w/ the 6.2 code. If you have any compile errors, those will be indicators of underlying changes to the API. Hooks will take special care to verify, especially if they're jsp hooks.

Once you get familiar with the changes, you can short cut this by moving the plugin from the 6.1 sdk to the 6.2 sdk and manually tweaking the files so they're 6.2 compatible. Mostly it will fall to the liferay-plugin-package.properties file changes and clean compile against the new sdk, but if you take your time and learn the differences in detail you'll fare much better when it comes to plowing through your migrations.
Traolly Xiong, módosítva 9 év-val korábban

RE: Liferay 6.2 Plugins SDK upgrade from 6.1 SDK

Regular Member Bejegyzések: 195 Csatlakozás dátuma: 2011.12.30. Legújabb bejegyzések
Thanks David.

I was afraid of getting a response about re-creating a 6.2 plugin and migrating the needed 6.1 plugin files / code over manually and just wanted a easy shotgun approach, but it is what it is emoticon. The point you made about understanding the differences first, go slow, and when feel more comfortable with the changes, then create / take the more efficient path to migrating the 6.1 plugins to the new 6.2 sdk make perfect sense. I appreciate the help and will give it a try.

Just curious though, this is our 2nd upgrade since we've started using the Liferay platform and sdk. Do you think Liferay will plan to create a faster sdk migration process or will it always be one of these trail and error migrations? I can see us maybe upgrading a few more times in the future as more great features
comes out bundled in new Liferay releases.

Regards,
Traolly Xiong
thumbnail
David H Nebinger, módosítva 9 év-val korábban

RE: Liferay 6.2 Plugins SDK upgrade from 6.1 SDK

Liferay Legend Bejegyzések: 14914 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
It will always be at least this bad emoticon Major releases tend to have some pretty significant fundamental changes, and will invalidate a lot of what came before.

For example, going from 5 to 6 meant changing from jquery to AUI (if you wanted to do things the right way). Who knows what js 7 will be based on... emoticon I do know they're planning on leveraging OSGi more, but don't know what kind of impact that's going to bring to the SDK...

The minor releases should not be hard, i.e. 6.2 GA1 to GA2 is as easy as replacing the SDK, but build etc. will all be fine.
Traolly Xiong, módosítva 9 év-val korábban

RE: Liferay 6.2 Plugins SDK upgrade from 6.1 SDK

Regular Member Bejegyzések: 195 Csatlakozás dátuma: 2011.12.30. Legújabb bejegyzések
I hope there will be a better way of migrating sdk plugins in the future. I'm excited to go this upcoming Liferay event and see if there ways to make
this migration less painful.

Thanks!
thumbnail
David H Nebinger, módosítva 9 év-val korábban

RE: Liferay 6.2 Plugins SDK upgrade from 6.1 SDK

Liferay Legend Bejegyzések: 14914 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
It is a little easier if you're using Maven. You just have to change the versions of Liferay and the Liferay Maven plugin and attempt a clean rebuild, fixing whatever errors arise as a result.

The only problem I've seen with this path is when the Liferay Maven plugin goes through significant changes (i.e. some of the first Maven archetypes are significantly different than the latest version). But in this case you just have to create a new project, overlay your src folder contents and then continue...