Browse Source

Add noEJBC attribute to <ejbjar>'s weblogic element to skip ejbc.

PR:	1654


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269291 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 24 years ago
parent
commit
2cd414161e
2 changed files with 32 additions and 2 deletions
  1. +6
    -0
      docs/manual/OptionalTasks/ejb.html
  2. +26
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java

+ 6
- 0
docs/manual/OptionalTasks/ejb.html View File

@@ -847,6 +847,12 @@ define this as META-INF/Customer-weblogic-cmp-rdbms-jar.xml.</p>
<td valign="top"><b>Deprecated</b> This is an antonym for newCMP which should be used instead.</td> <td valign="top"><b>Deprecated</b> This is an antonym for newCMP which should be used instead.</td>
<td valign="top" align="center">No.</td> <td valign="top" align="center">No.</td>
</tr> </tr>
<tr>
<td valign="top">noEJBC</td>
<td valign="top">If this attribute is set to true, Weblogic's ejbc will not be run on the EJB jar.
Use this if you prefer to run ejbc at deployment time.</td>
<td valign="top" align="center">No.</td>
</tr>
</table> </table>


<p>The weblogic nested element itself supports two nested elements &lt;classpath&gt; and <p>The weblogic nested element itself supports two nested elements &lt;classpath&gt; and


+ 26
- 2
src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java View File

@@ -119,6 +119,9 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {


private boolean alwaysRebuild = true; private boolean alwaysRebuild = true;


/** controls whether ejbc is run on the generated jar */
private boolean noEJBC = false;
/** /**
* Indicates if the old CMP location convention is to be used. * Indicates if the old CMP location convention is to be used.
*/ */
@@ -254,7 +257,15 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
public void setNewCMP(boolean newCMP) { public void setNewCMP(boolean newCMP) {
this.newCMP = newCMP; this.newCMP = newCMP;
} }

/**
* Do not EJBC the jar after it has been put together.
*
*/
public void setNoEJBC(boolean noEJBC) {
this.noEJBC = noEJBC;
}
protected void registerKnownDTDs(DescriptorHandler handler) { protected void registerKnownDTDs(DescriptorHandler handler) {
// register all the known DTDs // register all the known DTDs
handler.registerDTD(PUBLICID_EJB11, DEFAULT_WL51_EJB11_DTD_LOCATION); handler.registerDTD(PUBLICID_EJB11, DEFAULT_WL51_EJB11_DTD_LOCATION);
@@ -372,7 +383,20 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
*/ */
private void buildWeblogicJar(File sourceJar, File destJar, String publicId) { private void buildWeblogicJar(File sourceJar, File destJar, String publicId) {
org.apache.tools.ant.taskdefs.Java javaTask = null; org.apache.tools.ant.taskdefs.Java javaTask = null;

if (noEJBC) {
try {
getTask().getProject().copyFile(sourceJar, destJar);
if (!keepgenerated) {
sourceJar.delete();
}
return;
}
catch (IOException e) {
throw new BuildException("Unable to write EJB jar", e);
}
}

String ejbcClassName = ejbcClass; String ejbcClassName = ejbcClass;
try { try {


Loading…
Cancel
Save