You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

serverdeploy.html 11 KiB

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