Skip to main content

How to Incrementally Publish

3 replies [Last post]
Joined: 2007-03-24

Every publish requires a complete build a redeploy of my ear. Is there a way, in glassfish, to incrementally deploy. For example, in JBoss and Resin you can deploy "exploded" and replace individual files (jsp, servlet, etc.) and the application server will integrate the changed file into the running application on the fly. Can you do that with glassfish? If so, how long would it take an average programmer, like myself, to upgrade the plugin to deploy exploded?

My ear is over 200MB. Every little change requires a grueling build and deploy.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2007-05-20

Hi. Although my apps are not that big, it still is waste of time everytime I have to publish in order to test changes.

At least for web modules, I think the plugin uses deploy to dir, but for some reason the directory it is deploying to is deep inside the workspaceDir/.metadata/.plugins/org.eclipse.wst.server.core/ directory. There it creates tmp directories where the deployed files reside. I think that because I have made changes to those jsp files directly and seen the changes been applied without any republish to the server. Please correct me if I am wrong.

Still, coming from a PHP background where all it takes to make changes to a page is to make them and save it, Java seems overly complicated.

Any ideas on how to cut the publishing time or eliminate it completely?

Joined: 2004-08-24

That's a big ear!

To reduce the build time, at least, you can usually break your project up into separate projects and include the lower-level stuff as libraries. Depends in how you are doing the ubuild-and-deploy.

Joined: 2004-03-26

You can use the following command to deploy incrementally.

asadmin deploydir --user admin --password admin_password exploded_dir

I don't know how much time that it would take to adjust the plugin, but with ANT it works like a charm.