I've written a task which deploys an enterprise archive on a Sun J2EE reference implementation server. The task is very simple (ATM it only forks and without any process control). Perhaps someone will want to improve it. Don't know if anyone has already written something better for this purpose, anyway here it is.
J2EEDeploy.java
Description: Binary data
J2EEDeploy
Description
Deploys an enterprise archive on a JavaTM 2 SDK, Enterprise Edition reference implementation server.
The task has been tested with version 1.2 and above
Parameters
| Attribute | Description | Required |
|---|---|---|
| earfile | The enterprise archive (.ear) file name. | Yes |
| hostname | The J2EE server host to deploy to. | No, default is "localhost" |
| j2eehome | The local directory where j2sdkee is installed. | Yes |
| clientjar | The file name of the client jar to generate. | No, default is no client jar generated. |
| jvm | The command used to invoke the Java Virtual Machine, default is 'java'. The command is resolved by java.lang.Runtime.exec(). | No, default "java" |
| dir | The directory to invoke the VM in. | No |
Examples
This deploys the myApp.ear archive on a J2EE server hosted on localhost.<j2eedeploy earfile="myApp.ear" j2eehome="c:\j2sdkee1.3" />
J2EE classes and tools are searched in c:\j2sdkee1.3.
<j2eedeploy dir="jars" earfile="myApp.ear"
j2eehome="/usr/local/j2sdkee1.2.1"
hostname="myServer.myDomain.com"
clientjar="myAppClient.jar" />
This deploys the jars/myApp.ear archive on a J2EE server hosted on myServer.myDomain.com,
generating a client jar named jars/myAppClient.jar.J2EE classes and tools are searched in /usr/local/j2sdkee1.2.1.
