« Back

Upgrading Your EXT Environment to an EXT Plugin

Company Blogs March 9, 2010 By Edward Shin Staff

Update: Please see the official documentation here:

www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/ext-plugins

Now that we have EXT Plugins, the million dollar question is what will happen to the EXT Environment?

First, let's cover the bad news. The EXT Environment will no longer exist in Liferay 6.0.

For those of you that use the EXT Environment primarily to change core code, this is a good thing because EXT Plugins handle core customizations better than the EXT Environment. You'll spend less time deploying and maintaining your changes with EXT plugins. See Introducing EXT Plugins! for more information.

For those of you (like me) that have made heavy customizations in the EXT Environment including custom portlets and services, you're probably a little nervous about this change.

 

The good news is that we have a script to help migrate your EXT Environments to EXT Plugins.

You can find the build.xml script in the Plugins SDK in trunk in the "ext" directory:
svn://svn.liferay.com/repos/public/plugins/trunk/ext

What the script does is create an EXT Plugin from the ext.zip file and merge in your changes from your EXT Environment.

Let's take a look at how this works in practice.

Assuming that your EXT Environment is located in /Users/ed/projects/ext:
(The Windows equivalent would be C:/projects/ext)

We can run the following command to migrate the code from the EXT Environment to EXT Plugins:
ant upgrade-ext -Dext.dir=/Users/ed/projects/ext -Dext.name=hello-world -Dext.display.name="Hello World"

Where:
-Dext.dir is a command line argument to the location of the EXT Environment
-Dext.name is the name of the EXT Plugin that you want to create
-Dext.display.name is the display name (See liferay-plugin-package.properties)

This will create a hello-world-ext directory with the merged changes from your EXT Environment.

Both build-service (ServiceBuilder) and build-db (DBBuilder) have been ported to EXT Plugins to allow developers to regenerate their services and SQL code in EXT Plugins:

 

But as noted in the warning message, ServiceBuilder in EXT plugins will be deprecated in future versions, and custom services should be migrated to portlet plugins. Try to migrate your custom services to portlet plugins as soon as possible as this is the recommended practice.

Additional Notes:

1. "build-services" in the above example is a custom target. You can define custom targets like this in order to make them work properly with Service Builder:

 

<target name="build-service-test">

<antcall target="build-service">

<param name="service.file" value="docroot/WEB-INF/ext-impl/src/com/test/service.xml" />

</antcall>

</target>

2. If you're using a version of Liferay that uses ext-ejb instead of ext-impl, you must first upgrade to Liferay 5.2 before migrating your code to an EXT Plugin.

 

Threaded Replies Author Date
I have a well structured build process in 5.2... b v j March 11, 2010 6:36 PM
b v j, will respond to your questions in the... Edward Shin March 11, 2010 9:56 PM
hi,can any one help me with this .. i got this... Srikanth Reddy July 7, 2010 12:34 AM
and also what exactly the above given sentence... Srikanth Reddy July 7, 2010 12:34 AM
hi Srikanth, just go and find at... Sharath Babu A July 22, 2010 10:25 PM
Hi simon, thank you verymuch ,yes... Srikanth Reddy July 26, 2010 3:51 AM
This is very interesting. Thank you, Ed! Xinsheng Chen March 11, 2010 7:38 PM
Interesting. Thank You, Sir Bavithra Rajendran March 14, 2010 11:16 PM
Awesome work :) Sandeep Nair April 14, 2010 2:33 AM
Thanks! Credit should go to Tomas (IBA, CZ) and... Edward Shin April 15, 2010 6:11 AM
I saw that this is also included to Liferay 5.2... Sampsa Sohlman April 16, 2010 4:12 AM
For overriding core classes and anything within... Edward Shin April 16, 2010 6:56 AM
Hi, Edward, I have some problem with the ext... Xinsheng Robert Chen January 19, 2011 4:24 PM
I'm having the same problem. Did you finally... Elena Fernandez February 14, 2011 7:41 AM
Hi, Elena, Please try to download the Plugins... Xinsheng Robert Chen February 14, 2011 10:07 AM
Hi, I have an Liferay 5.2.3 EXT environment... Henry Zhao April 7, 2011 8:30 PM
[...] We should not build any services inside... Anonymous June 28, 2011 2:38 AM

I have a well structured build process in 5.2 that utilizes the Service Builder tooling against generated EXT images. The extended db and SOAP services behave well, and properly support plugins that utilize the EXTed services. My EXT project configuration also supports the upgrade process that follows the db upgrade patterns implemented in the kernel. The EXT framework has proven to be a reliable and robust feature of Liferay 5.x

With 6.x, I'm concerned that I lose the level of extensibility intregration available in 5.2. It's not a matter of adapting my ant tooling to the 6.x configuration, it's a question of limitations in 6.x plugins that are not present in 5.2 EXT.

Prior to using the Service Builder in EXT, I tried adding services via the 5.x plugins framework. I recall problems with invalid db sessions related to thread contexts, and schema management issues that made the plugin approach unattractive in comparison to the EXT option.


1) Is it necessary to drop the EXT framework?

2) Will the Service Builder tooling be fully supported in 6.x?

3) Will we be able to hook into the upgrade process as possible in EXT?

4) Will tests be performed to validate DB schema extensions and the wire services extensions such as SOAP and JSON? Will the tests be available to the community?

5) Does portal-ext.properties serve any purpose in 6.x?



Related forum thread: http://www.liferay.com/community/forums/-/message_boards/message/4533829
Posted on 3/11/10 6:36 PM.
This is very interesting. Thank you, Ed!
Posted on 3/11/10 7:38 PM.
b v j, will respond to your questions in the forum thread.
Posted on 3/11/10 9:56 PM in reply to b v j.
Interesting. Thank You, Sir
Posted on 3/14/10 11:16 PM.
Awesome work emoticon
Posted on 4/14/10 2:33 AM.
Thanks! Credit should go to Tomas (IBA, CZ) and Brian though. =)
Posted on 4/15/10 6:11 AM in reply to Sandeep Nair.
I saw that this is also included to Liferay 5.2 SP3. Is the plugin mature enough on to use on 5.2 SP3 instead of old ext.
Posted on 4/16/10 4:12 AM.
For overriding core classes and anything within the portal source code, the plugin is mature enough to use. If you're just starting to use EXT Plugins, as mentioned above, do not use it to create custom services.
Posted on 4/16/10 6:56 AM in reply to Sampsa Sohlman.
hi,can any one help me with this ..
i got this error when i tried to use this command:
:ant build-services
BUILD FAILED
Target "build-services" does not exist in the project "ext".

and also got this error when i used the above command to run DBBuilder
ie..ant build-db

build-db:

.

WARNING: Support for ServiceBuilder in EXT plugins will be deprecated in future
versions. EXT plugins are designed to override the portal's core code that
cannot be done with hooks, layout templates, portlets, or themes. EXT plugins
are not meant to contain new custom services. Please migrate your service.xml to
a portlet plugin.


BUILD FAILED

,i tried to find build-parent.xml file in ext-impl,but i didnt see any such thing there ,
Can anyone let me know,how are we suppose to generate Service builder and Db builber
Posted on 7/7/10 12:34 AM in reply to Ed Shin.
and also what exactly the above given sentence mean:
Both build-service (ServiceBuilder) and build-db (DBBuilder) have been ported to EXT Plugins to allow developers to regenerate their services and SQL code in EXT Plugins:
Posted on 7/7/10 12:34 AM in reply to Ed Shin.
hi Srikanth,

just go and find at (plugins\themes)what is exactly in the build-common-theme.xml either "service" or "services" and then run ant command. Ex:ant build-{service or services}. I think it will resolve.

Rgds
Posted on 7/22/10 10:25 PM in reply to Srikanth Reddy.
Hi simon,
thank you verymuch ,yes there is some mistake ,it printed as Services ,but when i gave the command service ,its working
Thank you very much
Posted on 7/26/10 3:51 AM in reply to simon tuffle.
Hi, Edward,

I have some problem with the ext environment upgrade in Liferay 6.0.11. It is like this:

(1)

C:\aproject\workspace\liferay-plugins-sdk-6.0-ee-sp1\ext>ant upgrade-ext -Dext.dir=C:/aproject/downloads/LR6EE-CA/trunk/ext -Dext.name
=bprjct -Dext.display.name=bprjct
...
BUILD FAILED
C:\aproject\workspace\liferay-plugins-sdk-6.0-ee-sp1\ext\build.xml:6:
The following error occurred while executing this line:
C:\aproject\workspace\liferay-plugins-sdk-6.0-ee-sp1\build-common-plug
ins.x­ml:4: The following error occurred while executing this line:
C:\aproject\workspace\liferay-plugins-sdk-6.0-ee-sp1\build-common.xml:
72: .

Task cannot continue because ECJ is not installed.

ECJ was automatically installed. Please rerun your task.

(2) Now I re-run the command:

C:\aproject\workspace\liferay-plugins-sdk-6.0-ee-sp1\ext>ant upgrade-e
xt -Dext.dir=C:/aproject/downloads/LR6EE-CA/trunk/ext -Dext.name
=bprjct -Dext.display.name=bprjct
Buildfile: C:\aproject\workspace\liferay-plugins-sdk-6.0-ee-sp1\ext\build.xml
upgrade-ext:
cr­eate:
BUILD FAILED
C:\aproject\workspace\liferay-plugins-sdk-6.0-ee-sp1\ext\build.xml:79:
The following error occurred while executing this line:
C:\aproject\workspace\liferay-plugins-sdk-6.0-ee-sp1\ext\build.xml:31:
bprjct-ext already exists.
Total time: 3 seconds

The fact is the "bprjct-ext/" directory is not there. However, I cannot go on anymore.

Has anybody had a similar problem?

Thanks!
Posted on 1/19/11 4:24 PM.
I'm having the same problem.
Did you finally find a solution for it?
Posted on 2/14/11 7:41 AM in reply to Xinsheng Robert Chen.
Hi, Elena,

Please try to download the Plugins SDK for Liferay 6.0 SP1 again and try.
Posted on 2/14/11 10:07 AM in reply to Elena Fernandez.
Hi,

I have an Liferay 5.2.3 EXT environment that I ran the upgrade to make it a Liferay 6 EXT Plugin, without including the source code for com.ext and com.liferay.portal.service packages from 5.2.3. When I deploy, I got the following error:

WARN [PortletLocalServiceImpl:553] Portlet with the name 51 is described in liferay-portlet.xml but does not have a matching entry in po
rtlet.xml
ERROR [PortletBagFactory:118] java.lang.ClassNotFoundException: com.ext.portlet.reports.ReportsPortlet

Do I need to include the old com.ext package from 5.2.3 to build, or is there a equivalent jar in Liferay 6?

Thanks!
Posted on 4/7/11 8:30 PM.
[...] We should not build any services inside the EXT as of Liferay 6.0. The following link may help you understand more about EXT-plugins and how they are different from the previous EXT-environment:... [...] Read More
Posted on 6/28/11 2:38 AM.