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