Foros de discusión

Ext environment : Ant target to create war file instead of deploying

Alf Høgemark, modificado hace 15 años.

Ext environment : Ant target to create war file instead of deploying

Junior Member Mensajes: 34 Fecha de incorporación: 24/05/08 Mensajes recientes
Hi

I have a number of suggestions to the Ant targets in the Extension environment, but after multiple posts to the forums today, I will limit myself to only asking this for now :
Is there an Ant target to create the war file for the whole extension enviroment ?
I know there is the "deploy" target, which deploys everything to Tomcat, for example.

But I have a separate build machine, and I want it to build a war file, which can then be copied to the staging machine where Tomcat is running.

I have been looking for this target, and googling, and saw some suggestion on a property that would control if the war was "unpacked", but I have not found anything that gives me a plain war file from the "Ext" environment.

If there isn't such a target, wouldn't it make sense to make an Ant target named for example "dist", which creates the war file ?

In all the other projects I have been involved in, there has been a target which creates a war file. It is nice with "hot deploy", but the "cold deploy" from a build machine to a range of other machines is also very useful.



Regards
Alf Hogemark
thumbnail
Faisal K, modificado hace 15 años.

RE: Ext environment : Ant target to create war file instead of deployingHi

Regular Member Mensajes: 138 Fecha de incorporación: 9/01/08 Mensajes recientes
Hi Alf Høgemark,

There is no ant script available for creating war file from the EXT right now. It is a good idea that if liferay provides that option, It is better you can start implementing the same.
Thomas Kellerer, modificado hace 15 años.

RE: Ext environment : Ant target to create war file instead of deployingHi

Expert Mensajes: 490 Fecha de incorporación: 9/06/08 Mensajes recientes
If the build.xml does not offer a target to create a war file, how is the war file created that can be downloaded from sourceforge?
thumbnail
Bruno Farache, modificado hace 15 años.

RE: Ext environment : Ant target to create war file instead of deploying

Liferay Master Mensajes: 603 Fecha de incorporación: 14/05/07 Mensajes recientes
The ext is always deployed to the ROOT webapp, this way you can override some portal classes with a custom behavior and use the same classloader that Liferay does, that's why it cannot be a separate war, it needs to go the same context that Liferay resides.

If you want to deploy as a separate war you need to develop using the plugins sdk, portlets wars that can be downloaded in the official repository are developed with this sdk. Keep in mind that if you do that, you won't be able to do what I've mentioned above, unless you configure its context.xml to use the portal class loader. If you need to change some portal behavior you will need to create a hook, here are some docs:


http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/How+to+access+the+full+Liferay+API+from+a+portlet+application

http://www.liferay.com/web/bchan/blog/-/blogs/customizing-portal-jsps-from-a-portlet
thumbnail
Bruno Farache, modificado hace 15 años.

RE: Ext environment : Ant target to create war file instead of deploying

Liferay Master Mensajes: 603 Fecha de incorporación: 14/05/07 Mensajes recientes
More info about plugins sdk can be found at:

http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Plugins+SDK
Oliver Thoms, modificado hace 14 años.

RE: Ext environment : Ant target to create war file instead of deploying

New Member Mensajes: 17 Fecha de incorporación: 15/01/09 Mensajes recientes
@ Bruno
I guess this is a missunderstanding and your answer might be off a bit.


I'm seraching for exactly the same:

Building an complete own Liferay, meaning Liferay plus any EXT changes into one 'proprietary version' of Liferay.
So it would basicly be, packing the tomcat/webapps/ROOT back into the WAR.


Best hint so far: NOT SUPPORTED! Write a own build target.