Update: Please see the official documentation here:
www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/ext-plugins
The first step that we need to take is to "Check Out" or download the Plugins SDK here:
svn://svn.liferay.com/repos/public/plugins/trunk
You'll have to know how to use an SVN client to check out the latest Plugins SDK, but you'll be able to download it from our website once we release 6.0.
I'll include some screenshots in case you just want a general idea of how it works before it's released.
After checking out the new Plugins SDK, you'll notice that there's a new "ext" directory available:
- We can create a hello-world-ext plugin using the the following command for Unix:
./create.sh hello-world "Hello World"
Or the following command for Windows:
create hello-world "Hello World"
This will create a hello-world-ext plugin which should look like this:
Notice the similarities with the EXT Environment:
- Now let's run an "ant clean":
We get this error message because we haven't defined any of the properties:
app.server.zip.name is the location of the zipped server bundle
ext.work.dir is the location where you want to unzip your server
app.server.dir is the location of your server directory
We'll need these properties so that ant knows the location of the app.server.dir (server directory), the location of the app.server.zip.name (zipped server bundle) and the ext.work.dir (location where you want to unzip your server).
- You can create your own zipped Tomcat bundle by reading my blog post here:
Building a Tomcat Bundle from Liferay trunk
- Once you've created your zipped Tomcat bundle, you can point your "app.server.zip.name" property to it like this:
app.server.zip.name=/Users/ed/liferay/portal/dist/liferay-portal-tomcat-6.0.0.zip
- Create your build.${user.name}.properties file here:
- Set the location of your properties. I've set mine as follows:
That's all you need to do to set up the environment!
To recap, all we've done so far is set up 3 properties for the location of our server, the location of our zipped server bundle and the directory that we want to unzip the bundle to.
Now we can see how this works in action:
Running "ant clean" will now delete the server directory and unzip a clean copy of our zipped server bundle:
Running "ant compile" will compile all the necessary ext code.
Running "ant war" will create /plugins/dist/hello-world-ext-5.3.0.1.war
You can hot deploy this war to a running Liferay bundle. It'll tell you to reboot after the ext plugin has been deployed (since you're changing core classes):
After creating your own hello-world-ext plugin, you'll now see how much lighter EXT Plugins is compared to the EXT Environment. Try modifying a few classes to see how it works in practice.
(Keep in mind that 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.)

