ASF Bugzilla – Attachment 8414 Details for
Bug 23396
New optional task ejbclientjar added
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
ejbclientjar task patch against HEAD with support-element support
ejbclientjar-task-head-diff-20031001.patch (text/plain), 13.03 KB, created by
Per Olesen
on 2003-10-01 06:19:13 UTC
(
hide
)
Description:
ejbclientjar task patch against HEAD with support-element support
Filename:
MIME Type:
Creator:
Per Olesen
Created:
2003-10-01 06:19:13 UTC
Size:
13.03 KB
patch
obsolete
>? src/etc/testcases/taskdefs/optional/ejb >? src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbClientJar.java >? src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJarHelper.java >? src/testcases/org/apache/tools/ant/taskdefs/optional/ejb >Index: WHATSNEW >=================================================================== >RCS file: /home/cvspublic/ant/WHATSNEW,v >retrieving revision 1.505 >diff -u -r1.505 WHATSNEW >--- WHATSNEW 23 Sep 2003 14:33:43 -0000 1.505 >+++ WHATSNEW 1 Oct 2003 06:10:56 -0000 >@@ -617,6 +617,10 @@ > or end of a file. Discussion started at > http://marc.theaimsgroup.com/?l=ant-user&m=106366791228585&w=2 > >+* New task <ejbclientjar> added to enable generation of a ejb client jar >+ file from a generic ejb jar file as input. >+ This also fixes Bugzilla Report 21543. >+ > Changes from Ant 1.5.3 to Ant 1.5.4 > =================================== > >@@ -2523,4 +2527,4 @@ > > * The packagelistloc attribute of <javadoc>'s <link> child will be > resolved as a file (i.e. it is either absolute or relative to >- basedir). >\ No newline at end of file >+ basedir). >Index: build.xml >=================================================================== >RCS file: /home/cvspublic/ant/build.xml,v >retrieving revision 1.395 >diff -u -r1.395 build.xml >--- build.xml 25 Sep 2003 14:42:21 -0000 1.395 >+++ build.xml 1 Oct 2003 06:10:58 -0000 >@@ -248,6 +248,13 @@ > </or> > </selector> > >+ <selector id="needs.ejb"> >+ <or> >+ <filename name="${optional.package}/ejb/EjbClientJarTest*" /> >+ <filename name="${optional.package}/ejb/testejb/*" /> >+ </or> >+ </selector> >+ > <selector id="needs.icontract"> > <filename name="${optional.package}/IContract*"/> > </selector> >@@ -473,6 +480,17 @@ > </and> > </condition> > >+ <condition property="ejb.present"> >+ <and> >+ <available classname="javax.ejb.SessionBean" classpathref="classpath"/> >+ <available classname="javax.ejb.SessionContext" classpathref="classpath"/> >+ <available classname="javax.ejb.EJBException" classpathref="classpath"/> >+ <available classname="javax.ejb.CreateException" classpathref="classpath"/> >+ <available classname="javax.ejb.EJBHome" classpathref="classpath"/> >+ <available classname="javax.ejb.EJBObject" classpathref="classpath"/> >+ </and> >+ </condition> >+ > <condition property="some.regexp.support"> > <or> > <isset property="jdk1.4+"/> >@@ -624,6 +642,7 @@ > <selector refid="needs.bsf" unless="bsf.present"/> > <selector refid="needs.stylebook" unless="stylebook.present"/> > <selector refid="needs.javamail" unless="javamail.complete"/> >+ <selector refid="needs.ejb" unless="ejb.present"/> > <selector refid="needs.icontract" unless="icontract.present"/> > <selector refid="needs.netrexx" unless="netrexx.present"/> > <selector refid="needs.weblogic.ejbc" unless="ejb.ejbc.present"/> >Index: docs/manual/install.html >=================================================================== >RCS file: /home/cvspublic/ant/docs/manual/install.html,v >retrieving revision 1.59 >diff -u -r1.59 install.html >--- docs/manual/install.html 3 Sep 2003 07:58:04 -0000 1.59 >+++ docs/manual/install.html 1 Oct 2003 06:10:59 -0000 >@@ -402,7 +402,8 @@ > <td>bcel.jar</td> > <td>classfileset data type, > JavaClassHelper used by the ClassConstants filter reader and >- optionally used by ejbjar for dependency determination >+ optionally used by ejbjar for dependency determination.<br/> >+ Also used for dependency determination in <code>ejbclientjar</code>. > </td> > <td><a href="http://jakarta.apache.org/bcel/" target="_top">http://jakarta.apache.org/bcel/</a></td> > </tr> >Index: docs/manual/OptionalTasks/ejb.html >=================================================================== >RCS file: /home/cvspublic/ant/docs/manual/OptionalTasks/ejb.html,v >retrieving revision 1.36 >diff -u -r1.36 ejb.html >--- docs/manual/OptionalTasks/ejb.html 17 Jul 2003 11:05:15 -0000 1.36 >+++ docs/manual/OptionalTasks/ejb.html 1 Oct 2003 06:11:02 -0000 >@@ -20,6 +20,7 @@ > <li>Cyrille Morvan (<a href="mailto:cmorvan@ingenosya.com">cmorvan@ingenosya.com</a>)</li> > <li>Greg Nelson (<a href="mailto:gn@sun.com">gn@sun.com</a>)</li> > <li>Rob van Oostrum(<a href="mailto:rob@springwellfarms.ca">rob@springwellfarms.ca</a>)</li> >+ <li>Per Olesen (<a href="mailto:polesen@nordija.com">polesen@nordija.com</a>)</li> > </ul> > > <p>Version @VERSION@<br> >@@ -71,6 +72,7 @@ > <tr><td><a href="#ejbjar_jonas">jonas</a></td><td>JOnAS 2.4.x and 2.5</td></tr> > <tr><td><a href="#ejbjar_weblogic">weblogic</a></td><td>Weblogic 5.1 to 7.0</td></tr> > <tr><td><a href="#ejbjar_websphere">websphere</a></td><td>IBM WebSphere 4.0</td></tr> >+ <tr><td><a href="#ejbclientjar">ejbclientjar</a></td><td colspan="2">Generate a ejb client jar with client-view classes of ejbs</td></tr> > <tr><td><a href="#wlrun">wlrun</a></td><td colspan="2">Weblogic 4.5.1 to 7.0</td></tr> > <tr><td><a href="#wlstop">wlstop</a></td><td colspan="2">Weblogic 4.5.1 to 7.0</td></tr> > >@@ -315,6 +317,147 @@ > </pre> > > <hr> >+<h2><a name="ejbclientjar">ejbclientjar</a></h2> >+<h3><b>Description:</b></h3> >+ >+<p>The <code>ejbclientjar</code> task is used to generate ejb client jar files from ejbjar files. >+With the input of a ejbjar file (which can be generated using <a href="#ejbjar">ejbjar</a>, this >+task analyses the <code>ejb-jar.xml</code> deployment descriptor for classes in the beans client-view. >+The client-view classes include remote and local interface, pk-class, home and local home and >+any classes upon which these classes depend, including super-classes, classes used in parameters >+and exceptions.</p> >+ >+<p><em>NOTE:</em>This task depends upon the optional >+<a href="http://jakarta.apache.org/bcel">Byte Code Engineering Library for determining class dependencies</a>, >+which must be in our ant lib. Please refer to <a href="../install.html#librarydependencies">for a description >+of installing bcel with ant</a>. >+ >+<h3>Parameters:</h3> >+ >+<table border="1" cellpadding="2" cellspacing="0"> >+ <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">srcdir</td> >+ <td valign="top"> >+ The directory where the task looks for the ejbjar files to generate ejb client jar >+ files from. The task is a <a href="../CoreTypes/fileset.html">FileSet</a>, so when >+ selecting ejbjar files as input, this is the basedir which is searched. >+ </td> >+ <td valign="top" align="center">Yes</td> >+ </tr> >+ <tr> >+ <td valign="top">destdir</td> >+ <td valign="top"> >+ The directory where output ejb client jar files are written. >+ </td> >+ <td valign="top" align="center">Yes</td> >+ </tr> >+ <tr> >+ <td valign="top">manifestclasspathprefix</td> >+ <td valign="top"> >+ The value of this property is prefixed to any "Class-Path" attribute in the manifest in the >+ output ejb client jar. >+ In the process of determining dependencies, this task resolves where to find the files of the >+ dependent classes (by using the nested "classpath" element). If it finds dependent classes >+ in <code>.jar</code> or <code>.zip</code> files, these files are <em>not</em> added to the >+ resulting ejb client jar. Instead, they are referenced using a Class-Path attribute in the manifest. >+ </td> >+ <td valign="top" align="center">No. Default is "lib".</td> >+ </tr> >+ <tr> >+ <td valign="top">clientjarsuffix</td> >+ <td valign="top"> >+ Determines the naming of output ejb client jar files. If this property is set to "-bar", >+ and a input ejb jar file is named "foo.jar", the output ejb client jar is named "foo-bar.jar". >+ </td> >+ <td valign="top" align="center">No. Default is "-client".</td> >+ </tr> >+</table> >+ >+<h3>Nested Elements</h3> >+ >+<p>In addition to the standard nested elements of a <a href="../CoreTypes/fileset.html">FileSet</a>, >+this task also supports nested <code><classpath></code> and <code><dtd></code> elements.</p> >+ >+<h4><code>classpath</code></h4> >+ >+<p>Is the standard <code>classpath</code> element, which is a <a href="../using.html#path">path-like structure</a>. >+Use this element to give the classpath, that is used to find all client-view classes.</p> >+ >+<h4><code>support</code></h4> >+ >+<p>Makes it possible to include other files, which the automatic dependency analyzer does not find. >+This could for instance be classes which are loaded on demand with <code>Class.forName</code> >+or it could be resources. The <code>support</code> element is simply a <a href="../CoreTypes/fileset.html">FileSet</a>, >+and all files matched by the fileset is included in resulting client jar. More than one support element can be >+specified.</p> >+ >+<h4><code>dtd</code></h4> >+ >+<p>Specifies local dtd-locations used when parsing the <code>ejb-jar.xml</code> file. If this element is not >+specified, the xml parser will try and validate the dtd using whatever the <code>DOCTYPE</code> of the >+<code>ejb-jar.xml</code> specifies. Use this element if you would like to resolve dtds locally.</p> >+ >+<p>Parameters:</p> >+<table border="1" cellpadding="2" cellspacing="0"> >+ <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">publicId</td> >+ <td valign="top"> >+ Whatever follows <code>PUBLIC</code> in the <code>DOCTYPE</code> of the <code>ejb-jar.xml</code>. >+ </td> >+ <td valign="top" align="center">Yes</td> >+ </tr> >+ <tr> >+ <td valign="top">location</td> >+ <td valign="top"> >+ Where to find the dtd locally. >+ </td> >+ <td valign="top" align="center">Yes</td> >+ </tr> >+</table> >+ >+<h3>Examples</h3> >+ >+<p>This example builds client-view ejb client jar files for all ".jar" files found in <code>${build.ejbs.dir}</code>. >+The output files are written to <code>${build.clientejbs.dir}</code>, using a <code>-mysuffix</code> suffix >+and a <code>mylib</code> prefix to the value of any Class-Path attribute in manifest. >+Any created output files will include property files found in support fileset with basedir >+<code>${build.classes.dir}</code>.</p> >+ >+<p>Assuming the <code>${build.ejbs.dir}</code> directory contains the files <code>foo.jar</code> >+and <code>bar.jar</code>, the output files in <code>${build.clientejbs.dir}</code> will be named >+<code>foo-mysuffix.jar</code> and <code>bar-mysuffix.jar</code>. Also, if the client-view of bean >+<code>foo.jar</code> depends upon classes found in <code>xml-apis.jar</code> >+in the classpath, the manifest of the <code>foo-mysuffix.jar</code> will contain a <code>Class-Path</code> >+attribute with the value <code>mylib/xml-apis.jar</code>.</p> >+ >+<pre> >+ <target name="build-clientejbs" depends="build-ejbs"> >+ <ejbclientjar srcdir="${build.ejbs.dir}" destdir="${build.clientejbs.dir}" clientjarsuffix="-mysuffix" manifestclasspathprefix="mylib"> >+ <classpath> >+ <pathelement location="${build.classes.dir}" /> >+ <pathelement location="${lib.dir}/xml-apis.jar" /> >+ <pathelement location="${lib.dir}/xercesImpl.jar" /> >+ <classpath /> >+ <dtd publicid="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" location="${dtd.dir}/ejb-jar_2_0.dtd" /> >+ <include name="*.jar" /> >+ <support dir="${build.classes.dir}"> >+ <include name="**/*.properties" /> >+ <support /> >+ </ejbclientjar> >+ </target> >+</pre> >+ >+<hr> > <h2><a name="wlrun">wlrun</a></h2> > <h3><b>Description:</b></h3> > >@@ -546,6 +689,8 @@ > <li><a href="http://www.objectweb.org/jonas/">JOnAS</a> 2.4.x and 2.5 Open Source EJB server</li> > </ul> > >+<p>If you want to generate ejb client jars with client-view classes, >+you can use the <a href="#ejbclientjar">ejbclientjar</a> task.</p> > > <p>The task works as a directory scanning task, and performs an action for each > deployment descriptor found. As such the includes and excludes should be set >Index: src/main/org/apache/tools/ant/taskdefs/defaults.properties >=================================================================== >RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/defaults.properties,v >retrieving revision 1.153 >diff -u -r1.153 defaults.properties >--- src/main/org/apache/tools/ant/taskdefs/defaults.properties 6 Sep 2003 07:09:59 -0000 1.153 >+++ src/main/org/apache/tools/ant/taskdefs/defaults.properties 1 Oct 2003 06:11:04 -0000 >@@ -97,6 +97,7 @@ > vsshistory=org.apache.tools.ant.taskdefs.optional.vss.MSVSSHISTORY > vsslabel=org.apache.tools.ant.taskdefs.optional.vss.MSVSSLABEL > ejbjar=org.apache.tools.ant.taskdefs.optional.ejb.EjbJar >+ejbclientjar=org.apache.tools.ant.taskdefs.optional.ejb.EjbClientJar > mparse=org.apache.tools.ant.taskdefs.optional.metamata.MParse > mmetrics=org.apache.tools.ant.taskdefs.optional.metamata.MMetrics > maudit=org.apache.tools.ant.taskdefs.optional.metamata.MAudit
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 23396
:
8343
|
8344
| 8414 |
8415