source: other-projects/trunk/gs3-release-maker/apache-ant-1.6.5/docs/manual/OptionalTasks/serverdeploy.html@ 14627

Last change on this file since 14627 was 14627, checked in by oranfry, 17 years ago

initial import of the gs3-release-maker

File size: 11.0 KB
Line 
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>
272.4 Open Source EJB server</li>
28</ul>
29Over 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
49vendor-specific J2EE server. The task requires nested elements which define
50the attributes of the vendor-specific deployment tool being executed.
51Vendor-specific deployment tools elements may enforce rules for which
52attributes 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>
118This element is provided for generic Java-based deployment tools.
119The generic task accepts (but does not require) nested <code>arg</code>
120and <code>jvmarg</code> elements.
121A JVM will be spawned with the provided attributes. It is recommended
122that a vendor-specific element be used over the generic one if at all
123possible.
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>&lt;arg&gt;</code> and <code>&lt;jvmarg&gt;</code> elements.</p>
143
144<h3>Example</h3>
145
146<p>This example shows the use of generic deploy element to deploy a component
147using a Java based deploy tool:</p>
148
149<pre>
150 &lt;serverdeploy action=&quot;deploy&quot; source=&quot;${lib.dir}/ejb_myApp.ear&quot;&gt;
151 &lt;generic classname="com.yamato.j2ee.tools.deploy.DeployTool"
152 classpath=&quot;${classpath}&quot;
153 username=&quot;${user.name}&quot;
154 password=&quot;${user.password}&quot;&gt;
155 &lt;arg value="-component=WildStar"/&gt;
156 &lt;arg value="-force"/&gt;
157 &lt;jvmarg value="-ms64m"/&gt;
158 &lt;jvmarg value="-mx128m"/&gt;
159 &lt;/generic&gt;
160 &lt;/serverdeploy&gt;
161</pre>
162
163<a name="serverdeploy_weblogic">
164<h3>WebLogic element</h3>
165<p>
166The 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>,
171the <code>application</code> and <code>source</code> attributes must be set.
172If the action is <code>undeploy</code> or <code>delete</code>,
173the <code>application</code> attribute must be set. If the <code>username</code>
174attribute is omitted, it defaults to "system". The <code>password</code> attribute is
175required 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>&lt;component&gt;:&lt;target1&gt;,&lt;target2&gt;...</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 &lt;serverdeploy action=&quot;deploy&quot; source=&quot;${lib.dir}/ejb_myApp.ear&quot;&gt;
211 &lt;weblogic application=&quot;myapp&quot;
212 server=&quot;t3://myserver:7001&quot;
213 classpath=&quot;${weblogic.home}/lib/weblogic.jar&quot;
214 username=&quot;${user.name}&quot;
215 password=&quot;${user.password}&quot;
216 component=&quot;ejb_foobar:myserver,productionserver&quot;
217 debug=&quot;true&quot;/&gt;
218 &lt;/serverdeploy&gt;
219</pre>
220
221<p>This example shows serverdeploy being used to delete a component from a
222WebLogic server:</p>
223
224<pre>
225 &lt;serverdeploy action=&quot;delete&quot; source=&quot;${lib.dir}/ejb_myApp.jar&quot;/&gt
226 &lt;weblogic application=&quot;myapp&quot;
227 server=&quot;t3://myserver:7001&quot;
228 classpath=&quot;${weblogic.home}/lib/weblogic.jar&quot;
229 username=&quot;${user.name}&quot;
230 password=&quot;${user.password}&quot;/&gt;
231 &lt;/serverdeploy&gt;
232</pre>
233
234<a name="serverdeploy_jonas">
235<h3>JOnAS (Java Open Application Server) element</h3>
236<p>
237The 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
242task.
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>&lt;arg&gt;</code> and <code>&lt;jvmarg&gt;</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 &lt;serverdeploy action=&quot;deploy&quot; source=&quot;${lib.dir}/ejb_myApp.jar&quot;&gt;
292 &lt;jonas server=&quot;MyJOnAS&quot; jonasroot="${jonas.root}"&gt;
293
294 &lt;classpath&gt;
295 &lt;pathelement path=&quot;${jonas.root}/lib/RMI_jonas.jar&quot;/&gt;
296 &lt;pathelement path=&quot;${jonas.root}/config/&quot;/&gt;
297 &lt;/classpath&gt;
298 &lt;/jonas&gt;
299 &lt;/serverdeploy&gt;
300</pre>
301
302<p>This example shows serverdeploy being used to list the components from a
303JOnAS server and a WebLogic server:</p>
304
305<pre>
306 &lt;serverdeploy action=&quot;list&quot;/&gt
307 &lt;jonas jonasroot=&quot;${jonas.root}&quot; orb=&quot;JEREMIE&quot;/&gt;
308 &lt;weblogic application=&quot;myapp&quot
309 server=&quot;t3://myserver:7001&quot;
310 classpath=&quot;${weblogic.home}/lib/weblogic.jar&quot;
311 username=&quot;${user.name}&quot;
312 password=&quot;${user.password}&quot;/&gt;
313 &lt;/serverdeploy&gt;
314</pre>
315
316
317<hr>
318<p align="center">Copyright &copy; 2002,2004 The Apache Software Foundation. All rights Reserved.</p>
319</body>
320</html>
Note: See TracBrowser for help on using the repository browser.