« Back to Development

Deploying an EXT WAR file

Warning #

This page describe Extension Environment, which was used in Liferay <= 5.2.3. In never portal versions is Extension environment replaced by Ext plugin. For more info see http://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/ext-plugins.

Introduction #

Liferay's Extension Environment allows developers to customize Liferay. It has a lot of sophisticated Ant scripts which then merge these customizations with Liferay's source code and automatically deploy the combination to an application server.

Not all application servers (particularly proprietary ones) are supported by the Ant scipts, however. For this reason, users of these servers have to build the extension environment as a .war file and deploy it manually.

Procedure #

You can get everything deployed by copying over the necessary .jar files and creating a .war file. This would be somewhat of a manual process at first, but you should be able to later create an Ant task which can do this.

When Liferay's EXT Ant script deploys Liferay with customizations, it does the following things:

1. Creates ext-service.jar out of compiled code from ext-service/src.

2. Deploys that .jar to the global class path. You should know where this is for your application server.

3. Creates ext-impl.jar out of compiled code from ext-impl/src.

4. It then begins to copy files out to where Liferay is deployed. First, it deploys any portal-.properties or system-.properties files out to Liferay's WEB-INF/classes folder. It then deploys the ext-impl.jar file that was created above to WEB-INF/lib.

5. It then copies Liferay's portal-web folder into a temporary directory, and then copies your ext-web folder on top of it, thereby integrating your changes with Liferay's code. This gets created in ext-web/tmp. Once this is done, all of this gets deployed to the application server.

In order to replicate this procedure, you would need to deploy your EXT environment to a local development instance of one of the app servers that this procedure supports (Tomcat recommended, as it is the smallest). Once you've done that, you can then manually copy ext-service.jar to your application server's global class path.

Next, copy Liferay's regular dependencies in there as well. You would then need to build a .war file out of the contents of ext-web/tmp, making sure that your customized properties files are included in that .war file's WEB-INF/classes folder and that ext-impl.jar is included in that .war file's WEB-INF/lib folder. You will also need to make sure Liferay's dependencies from your EXT environment's lib/global and lib/portal directories are in there as well.

Once you have this .war file, you should be able to deploy this to your application server in place of Liferay's .war file.

0 Attachments
Average (3 Votes)
The average rating is 1.6666666666666667 stars out of 5.
Threaded Replies Author Date
hi all I struggling to create a war out of... Geo Raj K June 17, 2010 10:58 PM

hi all

I struggling to create a war out of the ext tmp

Can any body help me

Posted on 6/17/10 10:58 PM.