Hello again !
I sended my patch two times : a few weeks ago and a few days ago.
I will send my files until they will be commited or a someone gives a good reason to not do it !
There is a JBoss version of the DeploymentTool and Ant must have a JOnAS version !
Thank you.
-----------------------------------------------------------
Date: Mon, 24 Dec 2001 15:54:08 +0100 To: [EMAIL PROTECTED] From: Cyrille Morvan <[EMAIL PROTECTED]> Subject: [PATCH] [SUBMIT] ejb-jar/jonas element for ANT Cc: [email protected]
Hello,
Enclosed a new version of my add-on to deploy Enterprise Java Bean in JOnAS from ANT.
JOnAS is the Java Open Application Server, it's a good opensource EJB container from ObjectWeb.
Find it on http://www.objectweb.org/jonas/
There are 2 patches and a new file : -- EjbJar.java.patch prodives a new method to the task ejb-jar jakarta-ant\src\main\org\apache\tools\ant\taskdefs\optional\ejb\EjbJar.java
-- ejb.html.patch provides a new paragraph, how to use the new jonas element as the WebLogic, IPlanet or the JBoss elements.
jakarta-ant/docs/manual/OptionalTasks/ejb.html
-- JonasDeploymentTool.java is a new file to commit into
jakarta-ant\src\main\org\apache\tools\ant\taskdefs\optional\ejb\JonasDeploymentTool.java
Examples : <ejbjar srcdir="${build.classes}" descriptordir="${descriptor.dir}"> <jonas destdir="${deploymentjars.dir}" jonasroot="${jonas.root}" orb="RMI" /> <include name="**/*.xml"/> <exclude name="**/jonas-*.xml"/> </ejbjar>
<ejbjar srcdir="${build.classes}"
descriptordir="${descriptor.dir}"
basejarname="TheEJBJar">
<jonas destdir="${deploymentjars.dir}" jonasroot="${jonas.root}"
suffix=".jar" orb="JEREMIE"
classpath="${descriptorbuild.classpath}" />
<include name="**/ejb-jar.xml"/>
<exclude name="**/jonas-ejb-jar.xml"/>
</ejbjar>I will be very _happy_, if the Apache Ant team could commit my work before Ant 1.5 !
Thank you !
Merry xmas to the Apache Ant Dev Team and Jonas users list.
-- Cyrille Morvan IT Engineering student - FiiFo - University Paris-Sud
JonasDeploymentTool.java
Description: Binary data
Index:
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java
===================================================================
RCS file:
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java,v
retrieving revision 1.25
diff -u -r1.25 EjbJar.java
--- jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java
2001/12/11 14:18:52 1.25
+++ jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java
2001/12/24 14:23:14
@@ -275,6 +275,21 @@
}
/**
+ * Create a jonas nested element used to configure a
+ * deployment tool for JOnAS server.
+ *
+ * @return the deployment tool instance to be configured.
+ */
+ public JonasDeploymentTool createJonas() {
+ log("JOnAS deployment tools", Project.MSG_VERBOSE);
+
+ JonasDeploymentTool tool = new JonasDeploymentTool();
+ tool.setTask(this);
+ deploymentTools.add(tool);
+ return tool;
+ }
+
+ /**
* Create a nested element for weblogic when using the Toplink
* Object- Relational mapping.
*
Index: jakarta-ant/docs/manual/OptionalTasks/ejb.html =================================================================== RCS file: /home/cvspublic/jakarta-ant/docs/manual/OptionalTasks/ejb.html,v retrieving revision 1.11 diff -u -r1.11 ejb.html --- jakarta-ant/docs/manual/OptionalTasks/ejb.html 2001/10/30 10:05:38 1.11 +++ jakarta-ant/docs/manual/OptionalTasks/ejb.html 2001/12/24 14:25:11 @@ -16,11 +16,12 @@ <li>Tim Fennell (<a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>)</li> <li>Martin Gee (<a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>)</li> <li>Conor MacNeill (<a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>)</li> + <li>Cyrille Morvan (<a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>)</li> <li>Greg Nelson (<a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>)</li> </ul> <p>Version @VERSION@<br> -$Id: ejb.html,v 1.11 2001/10/30 10:05:38 bodewig Exp $ +$Id: ejb.html,v 1.12 2001/12/24 14:25:11 cyrille Exp $ </p> <hr> <h2>Table of Contents</h2> @@ -47,6 +48,8 @@ jboss 2.1</a> and above EJB servers</li> <li><a href="http://www.bea.com" target="_top">Weblogic</a> 4.5.1, 5.1, and 6.0 EJB servers</li> + <li><a href="http://www.objectweb.com/jonas/" target="_top">JOnAS</a> + 2.4 OpenSource EJB server</li> </ul> Over time we expect further optional tasks to support additional EJB Servers. @@ -64,11 +67,12 @@ <tr><td><a href="#ddcreator">ddcreator</a></td><td colspan="2">Weblogic 4.5.1</td></tr> <tr><td><a href="#ejbc">ejbc</a></td><td colspan="2">Weblogic 4.5.1</td></tr> <tr><td><a href="#iplanet-ejbc">iplanet-ejbc</a></td><td colspan="2">iPlanet Application Server 6.0</td></tr> - <tr><td rowspan="5"><a href="#ejbjar">ejbjar</a></td><td colspan="2" align="center"><b>Nested Elements</b></td></tr> + <tr><td rowspan="6"><a href="#ejbjar">ejbjar</a></td><td colspan="2" align="center"><b>Nested Elements</b></td></tr> <tr><td><a href="BorlandEJBTasks.html">borland</a></td><td>Borland Application Server 4.5</td></tr> <tr><td><a href="#ejbjar_jboss">jBoss</a></td><td>jBoss</td></tr> <tr><td><a href="#ejbjar_iplanet">iPlanet</a></td><td>iPlanet Application Server 6.0</td></tr> <tr><td><a href="#ejbjar_weblogic">weblogic</a></td><td>Weblogic 5.1 & 6.0</td></tr> + <tr><td><a href="#ejbjar_jonas">jonas</a></td><td>JOnAS 2.4</td></tr> <tr><td><a href="#wlrun">wlrun</a></td><td colspan="2">Weblogic 4.5.1, 5.1 & 6.0</td></tr> <tr><td><a href="#wlstop">wlstop</a></td><td colspan="2">Weblogic 4.5.1, 5.1 & 6.0</td></tr> @@ -1282,9 +1286,201 @@ <dtd publicId="-//Sun Microsystems, Inc.//DTD iAS Enterprise JavaBeans 1.0//EN" location="${ias.home}/APPS/IASEjb_jar_1_0.dtd"/> </ejbjar></pre> - +<h3><a name="ejbjar_jonas"> +<h3>JOnAS (Java Open Application Server) element</h3> +</a> +</h3> +<p> The <jonas> nested element is used to build JOnAS-specific stubs + and skeletons and construct a JAR file which may be deployed to the JOnAS + Application Server. The build process will always determine if the EJB +stubs/skeletons and the EJB-JAR file are up to date, and it will do the +minimum amount of work required. </p> +<p>Like the WebLogic element, a naming convention for the EJB descriptors + is most commonly used to specify the name for the completed JAR file. For + example, if the EJB descriptor ejb/Account.xml (or ejb/Account-ejb-jar.xml ) + is found in the descriptor directory, the jonas element will search for a + JOnAS-specific EJB descriptor file named ejb/jonas-Account.xml (if it isn't + found, the task will fail) and a JAR file named ejb/Account.jar will be + written in the destination directory. Note that when the EJB descriptors + are added to the JAR file, they are automatically renamed + META-INF/ejb-jar.xml and META-INF/jonas-ejb-jar.xml.<br> + + The jonas element is using JOnAS convention naming with its specific filenames + and do not follow strictly the ejb-jar naming convention recommendation. + The reason is backward compatibility with previous version of JOnAS.<br> + So you must use jonas-Account.xml and not Account-jonas-ejb-jar.xml filename. + I espere that the nuisance will be minimal. + </p> +<p>Of course, this naming behavior can be modified by specifying attributes + in the ejbjar task (for example, basejarname, basenameterminator, and flatdestdir) + as well as the iplanet element (for example, suffix). Refer to the appropriate + documentation for more details.</p> +<h3> Parameters:</h3> +<table border="1" cellspacing="0" cellpadding="2"> + <tbody> + <tr> + <td valign="Top"><b>Attribute</b></td> + <td valign="Top"><b>Description</b></td> + <td align="Center" valign="Top"><b>Required</b></td> + </tr> + <tr> + <td valign="Top">destdir</td> + <td valign="Top">The base directory into which the generated JAR files + will be written. Each JAR file is written in directories which correspond + to their location within the "descriptordir" namespace.</td> + <td align="Center" valign="Top">Yes</td> + </tr> + <tr> + <td valign="Top">jonasroot<br> + </td> + <td valign="Top">The root directory for JOnAS. <br> + </td> + <td valign="Top"> + <div align="Center">Yes<br> + </div> + </td> + </tr> + <tr> + <td valign="Top">workdir<br> + </td> + <td valign="Top">The work directory to use. Specify where to place +the generated files, before to add to the jar. The directory should be empty. +If omitted, it defaults to a temporary directory.<br> + </td> + <td valign="Top"> + <div align="Center">No<br> + </div> + </td> + </tr> + <tr> + <td valign="Top">classpath</td> + <td valign="Top">The classpath used when generating EJB stubs and skeletons. + If omitted, the classpath specified in the "ejbjar" parent task will be +used. If specified, the classpath elements will be prepended to the classpath + specified in the parent "ejbjar" task. Note that nested "classpath" elements + may also be used.</td> + <td align="Center" valign="Top">No</td> + </tr> + <tr> + <td valign="Top">keepgenerated</td> + <td valign="Top">Indicates whether or not the Java source files which + are generated by gewill be saved or automatically deleted. If "yes", the +source files will be retained. If omitted, it defaults to "no". </td> + <td align="Center" valign="Top">No</td> + </tr> + <tr> + <td valign="top">keepgeneric</td> + <td valign="top">This controls whether the generic file used as input to + ejbc is retained.</td> + <td valign="top" align="center">No, defaults to false</td> + </tr> + <tr> + <td valign="top">secpropag</td> + <td valign="top">Modify the RMI Skel. and Stub. to implement + the implicit propagation of the transactionnal + context and security context. + </td> + <td valign="top" align="center">No, defaults to false.</td> + </tr> + <tr> + <td valign="Top">orb<br> + </td> + <td>Choose your ORB : RMI, JEREMIE, DAVID, ... If omitted, it defaults +to the one present in classpath.<br> + </td> + <td align="Center" valign="Top">No</td> + </tr> + <tr> + <td valign="Top">noGENIC<br> + </td> + <td valign="Top">If this attribute is set to true, JOnAS's GenIC will + not be run on the EJB jar. Use this if you prefer to + run ejbc at deployment time.</td> + <td> + <div align="Center">No</div> + </td> + </tr> + <tr> + <td valign="Top">suffix</td> + <td>String value appended to the JAR filename when creating each JAR. + If omitted, it defaults to ".jar". </td> + <td align="Center" valign="Top">No</td> + </tr> + <tr> + <td valign="Top">verbose<br> + </td> + <td valign="Top">Indicates whether or not to use -verbose switch. If +omitted, it defaults to "no".</td> + <td valign="Top"> + <div align="Center">No<br> + </div> + </td> + </tr> + <tr> + <td valign="Top">compiler<br> + </td> + <td valign="Top">This allows for the selection of a different compiler + to be used for the compilation of the generated Java + files. This could be set, for example, to Jikes to + compile with the Jikes compiler. If this is not set + and the <code>build.compiler</code> property is set + to jikes, the Jikes compiler will be used. If this + is not desired, the value "<code>default</code>" + may be given to use the default compiler<br> + </td> + <td valign="Top"> + <div align="Center">No<br> + </div> + </td> + </tr> + <tr> + <td valign="Top">args<br> + </td> + <td valign="Top">Add additional args to GenIC.<br> + </td> + <td valign="Top"> + <div align="Center">No<br> + </div> + </td> + </tr> + </tbody> +</table> +<p>As noted above, the jonas element supports additional <classpath> + nested elements. </p> +<h3>Examples</h3> +<p>This example shows ejbjar being used to generate deployment jars using + a JOnAS EJB container. This example requires the naming standard to be + used for the deployment descriptors. Using this format will create a ejb + jar file for each variation of '*-jar.xml' that is found in the +deployment descriptor directory. </p> +<pre> + <ejbjar srcdir="${build.classes}" + descriptordir="${descriptor.dir}"> + <jonas destdir="${deploymentjars.dir}" + jonasroot="${jonas.root}" + orb="RMI" /> + <include name="**/*.xml"/> + <exclude name="**/jonas-*.xml"/> + <support dir="${build.classes}"> + <include name="**/*.class"/> + </support> + </ejbjar> +</pre> +<p></p> +<p>This example shows ejbjar being used to generate a single deployment jar + using a JOnAS EJB container. This example does not require the deployment + descriptors to use the naming standard. This will create only one ejb jar + file - 'TheEJBJar.jar'.</p> +<pre> + <ejbjar srcdir="${build.classes}" + descriptordir="${descriptor.dir}" + basejarname="TheEJBJar"> + <jonas destdir="${deploymentjars.dir}" suffix=".jar" jonasroot="${jonas.root}" + classpath="${descriptorbuild.classpath}" /> + <include name="**/ejb-jar.xml"/> + <exclude name="**/jonas-ejb-jar.xml"/> + </ejbjar> +</pre> </body> </html> - -
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
