views:

245

answers:

3

Assuming my clients are running my J2EE WAR application on their intranet, and I have an update for them... how do I push the updated war file to them?

I'd like it to be automatic and require no human interaction on the client's side.

Can this be done?

Any help would be appreciated.

+2  A: 

Tomcat (if this is your target container...) offers a manager interface that will allow you to deploy/start/stop applications.

I have used both ant and maven tasks to great effect in deploying wars remotely all while being built-in to the build process.

Depending on your deployment process, this may not work for you, but for dev & qa: highly recommended.

Edit: of course apache has to be configured for this type of access to be allowed.

See: Deployer how-to

Nathan
+1  A: 

I'm not sure if you're comfortable giving them access to your source code repository...even in read-only mode.

If you are, then you could script up something in ANT to check out the latest version of the source code (using CVS task) and then build the .war file (using WAR task).

The only trick would be automatically deploying it once the war has been built. Tomcat will automatically deploy applications copied into a certain directory. For Websphere, see this question and this question.

For other J2EE servers I don't know how it would be done.

Michael Sharek
+2  A: 

Glassfish has documentation on deployment here.

Ant tasks are also available here.

Glassfish uses Tomcat internally, but the Tomcat Manager is not available as it is a separate application.

If the glassfish admin console can be accessed, it can be used to upload and deploy war files.

Loki