1 | <html>
|
---|
2 |
|
---|
3 | <head>
|
---|
4 | <meta http-equiv="Content-Language" content="en-us">
|
---|
5 | <title>ServerDeploy Task</title>
|
---|
6 |
|
---|
7 | <link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
|
---|
8 | </head>
|
---|
9 |
|
---|
10 | <body>
|
---|
11 |
|
---|
12 | <h1><a name="serverdeploy">ANT ServerDeploy User Manual</a></h1>
|
---|
13 | <p>by</p>
|
---|
14 | <!-- Names are in alphabetical order, on last name -->
|
---|
15 | <ul>
|
---|
16 | <li>Christopher A. Longo (<a href="mailto:[email protected]">[email protected]</a>)</li>
|
---|
17 | <li>Cyrille Morvan (<a href="mailto:[email protected]">[email protected]</a>)</li>
|
---|
18 | </ul>
|
---|
19 |
|
---|
20 | </p>
|
---|
21 | <hr>
|
---|
22 | <p> At present the tasks support:<br>
|
---|
23 |
|
---|
24 | <ul>
|
---|
25 | <li><a href="http://www.bea.com" target="_top">Weblogic</a> servers</li>
|
---|
26 | <li><a href="http://www.objectweb.org/jonas/" target="_top">JOnAS</a>
|
---|
27 | 2.4 Open Source EJB server</li>
|
---|
28 | </ul>
|
---|
29 | Over time we expect further optional tasks to support additional J2EE Servers.
|
---|
30 | </p>
|
---|
31 |
|
---|
32 | <hr>
|
---|
33 |
|
---|
34 | <table border="1" cellpadding="5">
|
---|
35 | <tr><td>Task</td><td colspan="2">Application Servers</td></tr>
|
---|
36 | <tr><td rowspan="4"><a href="#serverdeploy_element">serverdeploy</a></td><td colspan="2" align="center"><b>Nested Elements</b></td></tr>
|
---|
37 | <tr><td><a href="#serverdeploy_generic">generic</a></td><td>Generic task</td></tr>
|
---|
38 | <tr><td><a href="#serverdeploy_jonas">jonas</a></td><td>JOnAS 2.4</td></tr>
|
---|
39 | <tr><td><a href="#serverdeploy_weblogic">weblogic</a></td><td>Weblogic</td></tr>
|
---|
40 |
|
---|
41 | </table>
|
---|
42 |
|
---|
43 | <a name="serverdeploy_element">
|
---|
44 | <h2>ServerDeploy element</h2>
|
---|
45 |
|
---|
46 | <h3><b>Description:</b></h3>
|
---|
47 |
|
---|
48 | <p>The <code>serverdeploy</code> task is used to run a "hot" deployment tool for
|
---|
49 | vendor-specific J2EE server. The task requires nested elements which define
|
---|
50 | the attributes of the vendor-specific deployment tool being executed.
|
---|
51 | Vendor-specific deployment tools elements may enforce rules for which
|
---|
52 | attributes are required, depending on the tool.
|
---|
53 | </p>
|
---|
54 |
|
---|
55 | <h3>Parameters:</h3>
|
---|
56 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
57 | <tr>
|
---|
58 | <td valign="top"><b>Attribute</b></td>
|
---|
59 | <td valign="top"><b>Description</b></td>
|
---|
60 | <td valign="top"><b>Required</b></td>
|
---|
61 | </tr>
|
---|
62 | <tr>
|
---|
63 | <td valign="top">action</td>
|
---|
64 | <td valign="top">This is the action to be performed. For most cases this
|
---|
65 | will be "deploy". Some tools support additional actions, such as "delete", "list",
|
---|
66 | "undeploy", "update"...</td>
|
---|
67 | <td>Yes</td>
|
---|
68 | </tr>
|
---|
69 | <tr>
|
---|
70 | <td valign="top">source</td>
|
---|
71 | <td valign="top">A fully qualified path/filename of the component to be deployed.
|
---|
72 | This may be an .ear, .jar, .war, or any other type that is supported by the server.
|
---|
73 | </td>
|
---|
74 | <td>Tool dependent</td>
|
---|
75 | </tr>
|
---|
76 | </table>
|
---|
77 |
|
---|
78 | <h3>Nested Elements</h3>
|
---|
79 |
|
---|
80 | <p>The serverdeploy task supports a nested <code>classpath</code> element to set the classpath.</p>
|
---|
81 |
|
---|
82 | <h3>Vendor-specific nested elements</h3>
|
---|
83 |
|
---|
84 | <h3>Parameters used for all tools:</h3>
|
---|
85 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
86 | <tr>
|
---|
87 | <td valign="top"><b>Attribute</b></td>
|
---|
88 | <td valign="top"><b>Description</b></td>
|
---|
89 | <td valign="top"><b>Required</b></td>
|
---|
90 | </tr>
|
---|
91 | <tr>
|
---|
92 | <td valign="top">classpath</td>
|
---|
93 | <td valign="top">The classpath to be passed to the JVM running the tool.
|
---|
94 | The classpath may also be supplied as a nested element.</td>
|
---|
95 | <td>Tool dependent</td>
|
---|
96 | </tr>
|
---|
97 | <tr>
|
---|
98 | <td valign="top">server</td>
|
---|
99 | <td valign="top">The address or URL for the server where the component will be deployed.</td>
|
---|
100 | <td>Tool dependent</td>
|
---|
101 | </tr>
|
---|
102 | <tr>
|
---|
103 | <td valign="top">username</td>
|
---|
104 | <td valign="top">The user with privileges to deploy applications to the server.</td>
|
---|
105 | <td>Tool dependent</td>
|
---|
106 | </tr>
|
---|
107 | <tr>
|
---|
108 | <td valign="top">password</td>
|
---|
109 | <td valign="top">The password of the user with privileges to deploy applications to the server.</td>
|
---|
110 | <td>Tool dependent</td>
|
---|
111 | </tr>
|
---|
112 | </table>
|
---|
113 |
|
---|
114 | <p>Also supported are nested vendor-specific elements.</p>
|
---|
115 |
|
---|
116 | <a name="serverdeploy_generic">
|
---|
117 | <h3>Generic element</h3>
|
---|
118 | This element is provided for generic Java-based deployment tools.
|
---|
119 | The generic task accepts (but does not require) nested <code>arg</code>
|
---|
120 | and <code>jvmarg</code> elements.
|
---|
121 | A JVM will be spawned with the provided attributes. It is recommended
|
---|
122 | that a vendor-specific element be used over the generic one if at all
|
---|
123 | possible.
|
---|
124 | <p>The following attributes are supported by the generic element.</p>
|
---|
125 | <p>
|
---|
126 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
127 | <tr>
|
---|
128 | <td valign="top"><b>Attribute</b></td>
|
---|
129 | <td valign="top"><b>Description</b></td>
|
---|
130 | <td valign="top"><b>Required</b></td>
|
---|
131 | </tr>
|
---|
132 | <tr>
|
---|
133 | <td valign="top">classname</td>
|
---|
134 | <td valign="top">This is the fully qualified classname of the Java based
|
---|
135 | deployment tool to execute.</td>
|
---|
136 | <td>Yes</td>
|
---|
137 | </tr>
|
---|
138 | </table>
|
---|
139 | </p>
|
---|
140 |
|
---|
141 | <h3>Nested Elements</h3>
|
---|
142 | <p>The generic element supports nested <code><arg></code> and <code><jvmarg></code> elements.</p>
|
---|
143 |
|
---|
144 | <h3>Example</h3>
|
---|
145 |
|
---|
146 | <p>This example shows the use of generic deploy element to deploy a component
|
---|
147 | using a Java based deploy tool:</p>
|
---|
148 |
|
---|
149 | <pre>
|
---|
150 | <serverdeploy action="deploy" source="${lib.dir}/ejb_myApp.ear">
|
---|
151 | <generic classname="com.yamato.j2ee.tools.deploy.DeployTool"
|
---|
152 | classpath="${classpath}"
|
---|
153 | username="${user.name}"
|
---|
154 | password="${user.password}">
|
---|
155 | <arg value="-component=WildStar"/>
|
---|
156 | <arg value="-force"/>
|
---|
157 | <jvmarg value="-ms64m"/>
|
---|
158 | <jvmarg value="-mx128m"/>
|
---|
159 | </generic>
|
---|
160 | </serverdeploy>
|
---|
161 | </pre>
|
---|
162 |
|
---|
163 | <a name="serverdeploy_weblogic">
|
---|
164 | <h3>WebLogic element</h3>
|
---|
165 | <p>
|
---|
166 | The WebLogic element contains additional attributes to run the
|
---|
167 | <code>weblogic.deploy</code> deployment tool.
|
---|
168 | <p>Valid actions for the tool are <code>deploy</code>, <code>undeploy</code>,
|
---|
169 | <code>list</code>, <code>update</code>, and <code>delete</code>.
|
---|
170 | <p>If the action is <code>deploy</code> or <code>update</code>,
|
---|
171 | the <code>application</code> and <code>source</code> attributes must be set.
|
---|
172 | If the action is <code>undeploy</code> or <code>delete</code>,
|
---|
173 | the <code>application</code> attribute must be set. If the <code>username</code>
|
---|
174 | attribute is omitted, it defaults to "system". The <code>password</code> attribute is
|
---|
175 | required for all actions.
|
---|
176 | <p>
|
---|
177 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
178 | <tr>
|
---|
179 | <td valign="top"><b>Attribute</b></td>
|
---|
180 | <td valign="top"><b>Description</b></td>
|
---|
181 | <td valign="top"><b>Required</b></td>
|
---|
182 | </tr>
|
---|
183 | <tr>
|
---|
184 | <td valign="top">application</td>
|
---|
185 | <td valign="top">This is the name of the application being deployed</td>
|
---|
186 | <td>Yes</td>
|
---|
187 | </tr>
|
---|
188 | <tr>
|
---|
189 | <td valign="top">component</td>
|
---|
190 | <td valign="top">This is the component string for deployment targets.
|
---|
191 | It is in the form <code><component>:<target1>,<target2>...</code>
|
---|
192 | Where component is the archive name (minus the .jar, .ear, .war
|
---|
193 | extension). Targets are the servers where the components will be deployed</td>
|
---|
194 | <td>no</td>
|
---|
195 | </tr>
|
---|
196 | <tr>
|
---|
197 | <td valign="top">debug</td>
|
---|
198 | <td valign="top">If set to true, additional information will be
|
---|
199 | printed during the deployment process.</td>
|
---|
200 | <td>No</td>
|
---|
201 | </tr>
|
---|
202 | </table>
|
---|
203 |
|
---|
204 |
|
---|
205 | <h3>Examples</h3>
|
---|
206 |
|
---|
207 | <p>This example shows the use of serverdeploy to deploy a component to a WebLogic server:</p>
|
---|
208 |
|
---|
209 | <pre>
|
---|
210 | <serverdeploy action="deploy" source="${lib.dir}/ejb_myApp.ear">
|
---|
211 | <weblogic application="myapp"
|
---|
212 | server="t3://myserver:7001"
|
---|
213 | classpath="${weblogic.home}/lib/weblogic.jar"
|
---|
214 | username="${user.name}"
|
---|
215 | password="${user.password}"
|
---|
216 | component="ejb_foobar:myserver,productionserver"
|
---|
217 | debug="true"/>
|
---|
218 | </serverdeploy>
|
---|
219 | </pre>
|
---|
220 |
|
---|
221 | <p>This example shows serverdeploy being used to delete a component from a
|
---|
222 | WebLogic server:</p>
|
---|
223 |
|
---|
224 | <pre>
|
---|
225 | <serverdeploy action="delete" source="${lib.dir}/ejb_myApp.jar"/>
|
---|
226 | <weblogic application="myapp"
|
---|
227 | server="t3://myserver:7001"
|
---|
228 | classpath="${weblogic.home}/lib/weblogic.jar"
|
---|
229 | username="${user.name}"
|
---|
230 | password="${user.password}"/>
|
---|
231 | </serverdeploy>
|
---|
232 | </pre>
|
---|
233 |
|
---|
234 | <a name="serverdeploy_jonas">
|
---|
235 | <h3>JOnAS (Java Open Application Server) element</h3>
|
---|
236 | <p>
|
---|
237 | The JOnAS element contains additional attributes to run the
|
---|
238 | <code>JonasAdmin</code> deployment tool.
|
---|
239 | <p>Valid actions for the tool are <code>deploy</code>, <code>undeploy</code>,
|
---|
240 | <code>list</code> and <code>update</code>.
|
---|
241 | <p>You can't use <code>user</code> and <code>password</code> property with this
|
---|
242 | task.
|
---|
243 | <p>
|
---|
244 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
245 | <tr>
|
---|
246 | <td valign="top"><b>Attribute</b></td>
|
---|
247 | <td valign="top"><b>Description</b></td>
|
---|
248 | <td valign="top"><b>Required</b></td>
|
---|
249 | </tr>
|
---|
250 | <tr>
|
---|
251 | <td valign="top">jonasroot</td>
|
---|
252 | <td valign="top">The root directory for JOnAS.</td>
|
---|
253 | <td>Yes</td>
|
---|
254 | </tr>
|
---|
255 | <tr>
|
---|
256 | <td valign="top">orb</td>
|
---|
257 | <td valign="top">Choose your ORB : RMI, JEREMIE, DAVID, ... If omitted, it defaults
|
---|
258 | to the one present in classpath. The corresponding JOnAS JAR is
|
---|
259 | automatically added to the classpath. If your orb is DAVID (RMI/IIOP) you must
|
---|
260 | specify davidhost and davidport properties.</td>
|
---|
261 | <td>No</td>
|
---|
262 | </tr>
|
---|
263 | <tr>
|
---|
264 | <td valign="top">davidhost</td>
|
---|
265 | <td valign="top">The value for the system property : <code>david.CosNaming.default_host</code> .</td>
|
---|
266 | <td>No</td>
|
---|
267 | </tr>
|
---|
268 | <tr>
|
---|
269 | <td valign="top">davidport</td>
|
---|
270 | <td valign="top">The value for the system property : <code>david.CosNaming.default_port</code> .</td>
|
---|
271 | <td>No</td>
|
---|
272 | </tr>
|
---|
273 | <tr>
|
---|
274 | <td valign="top">classname</td>
|
---|
275 | <td valign="top">This is the fully qualified classname of the Java based
|
---|
276 | deployment tool to execute. Default to <code>org.objectweb.jonas.adm.JonasAdmin</code></td>
|
---|
277 | <td>No</td>
|
---|
278 | </tr>
|
---|
279 |
|
---|
280 | </table>
|
---|
281 |
|
---|
282 | <h3>Nested Elements</h3>
|
---|
283 | <p>The jonas element supports nested <code><arg></code> and <code><jvmarg></code> elements.</p>
|
---|
284 |
|
---|
285 |
|
---|
286 | <h3>Examples</h3>
|
---|
287 |
|
---|
288 | <p>This example shows the use of serverdeploy to deploy a component to a JOnAS server:</p>
|
---|
289 |
|
---|
290 | <pre>
|
---|
291 | <serverdeploy action="deploy" source="${lib.dir}/ejb_myApp.jar">
|
---|
292 | <jonas server="MyJOnAS" jonasroot="${jonas.root}">
|
---|
293 |
|
---|
294 | <classpath>
|
---|
295 | <pathelement path="${jonas.root}/lib/RMI_jonas.jar"/>
|
---|
296 | <pathelement path="${jonas.root}/config/"/>
|
---|
297 | </classpath>
|
---|
298 | </jonas>
|
---|
299 | </serverdeploy>
|
---|
300 | </pre>
|
---|
301 |
|
---|
302 | <p>This example shows serverdeploy being used to list the components from a
|
---|
303 | JOnAS server and a WebLogic server:</p>
|
---|
304 |
|
---|
305 | <pre>
|
---|
306 | <serverdeploy action="list"/>
|
---|
307 | <jonas jonasroot="${jonas.root}" orb="JEREMIE"/>
|
---|
308 | <weblogic application="myapp"
|
---|
309 | server="t3://myserver:7001"
|
---|
310 | classpath="${weblogic.home}/lib/weblogic.jar"
|
---|
311 | username="${user.name}"
|
---|
312 | password="${user.password}"/>
|
---|
313 | </serverdeploy>
|
---|
314 | </pre>
|
---|
315 |
|
---|
316 |
|
---|
317 | <hr>
|
---|
318 | <p align="center">Copyright © 2002,2004 The Apache Software Foundation. All rights Reserved.</p>
|
---|
319 | </body>
|
---|
320 | </html>
|
---|