views:

739

answers:

4

Hi, I am developing a Jetspeed portal application running on Tomcat, using the Eclipse IDE with the Sysdeo Tomcat launcher plugin to enable debugging of the application running in Tomcat/Jetspeed.

I was wondering how to enable hot deploy of development changes for this environment? Does anyone know how to configure a Jetspeed portal web application to be hot-deployed from Eclipse? Can't really find any information on the net for Jetspeed hot deployment.

+3  A: 

I usually create an ant build file, loosely based on:

http://tomcat.apache.org/tomcat-6.0-doc/appdev/build.xml.txt

and use the 'install'/'remove' targets to deploy to a remote tomcat

Similar question here: http://stackoverflow.com/questions/1760297/remote-deploy-tomcat-webapp-from-eclipse

If you're talking about only developing on your local machine- you don't need an external plugin to eclipse, it has built in support for Tomcat and hot redeployment.

nos
+1  A: 

You might want to take a look at jrebel. I've been meaning to take a look myself - From my understanding, jrebel makes it possible to make source code changes and then be able to immediately see the results in a live environment (such as tomcat) without redeploying and/or restarting services.

Dave Paroulek
This is the right tool.
Alex Siman
A: 

You can use the bult-in (in the JEE version) Servers plugin:

  1. Go to Windows > Preferences > Server > Runtime environments and add your tomcat
  2. Either try using publishing, or use the FileSync plugin. There you can tell which folders from your project should be copied (live) to what directory on your machine (the tomcat/webapps/yourapp). With a little more effort the filesync configuration can be made machine independent (only using one parameter as TOMCAT_ROOT), in case you want to check-in the project to a repository where others will use it.
  3. Start your tomcat in debug mode and you have hot-deploy of everything you save.

I'm aware that using the FileSync plugin is not generally accepted, and publishing is the most common option, but FileSync gives you additional freedom to rearrange your classes and resources.

Bozho
A: 

From your question it is not entirely clear if you want to deploy your Jetspeed Portal project or a portlet application. The first is in fact a regular web application and theoretically can be hot-deployed using the Eclipse WTP plugin. If you are developing portlet applications, it is more complicated because they are not deployed to Tomcat directly, but to the Jetspeed deployement running in Tomcat (actual /webapps/jetspeed-portal/WEB-INF/deploy ).

A trick I used is deploying your application using your Maven build script. After that, you can copy the modifications made by tomcat to your web.xml of your portlet into your web.xml and deploy directly from Eclipse.

Martin Sturm
I want to deploy through Jetspeed, so yes its more complicated. I have considered trying to set the context 'docBase' of the individual portlet applications to the eclipse War path, as you could do with a normal Tomcat project but im not sure how to do it with the added Jetspeed layer. ANy ideas?
theringostarrs
I'm not sure if I understand you correctly. But when you deploy a portlet app using the Jetspeed WEB-INF/deploy dir, all what Jetspeed does is add some stuff to the web.xml of the portlet app and deploy it as a new WAR file in the Tomcat webapp dir. When you have done it once (without using Eclipse) you can copy the web.xml changes made by Jetspeed and put them in the web.xml of your portlet app directly. Then you can deploy it using Eclipse as a normal webapp, while Jetspeed still sees it as an Portlet application.
Martin Sturm