conor 00/10/16 02:41:26
Modified: src/main/org/apache/tools/ant/taskdefs/optional/ejb
WeblogicDeploymentTool.java
Log:
Provide access to more ejbc options
Revision Changes Path
1.5 +45 -1
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
Index: WeblogicDeploymentTool.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- WeblogicDeploymentTool.java 2000/09/09 11:48:11 1.4
+++ WeblogicDeploymentTool.java 2000/10/16 09:41:22 1.5
@@ -79,7 +79,14 @@
private Path classpath;
/** Instance variable that determines whether generic ejb jars are kept.
*/
+
+ private boolean keepgenerated = false;
+
+ private String additionalArgs = "";
+
private boolean keepGeneric = false;
+
+ private String compiler = null;
/**
* Set the classpath to be used for this compilation.
@@ -89,6 +96,15 @@
}
/**
+ * The compiler (switch <code>-compiler</code>) to use
+ */
+ public void setCompiler(String compiler)
+ {
+ this.compiler = compiler;
+ }
+
+
+ /**
* Setter used to store the suffix for the generated weblogic jar file.
* @param inString the string to use as the suffix.
*/
@@ -103,6 +119,25 @@
public void setKeepgeneric(boolean inValue) {
this.keepGeneric = inValue;
}
+
+ /**
+ * Sets whether -keepgenerated is passed to ejbc (that is,
+ * the .java source files are kept).
+ * @param inValue either 'true' or 'false'
+ */
+ public void setKeepgenerated(String inValue)
+ {
+ this.keepgenerated = Boolean.valueOf(inValue).booleanValue();
+ }
+
+ /**
+ * sets some additional args to send to ejbc.
+ */
+ public void setArgs(String args)
+ {
+ this.additionalArgs = args;
+ }
+
/**
* Setter used to store the location of the weblogic DTD. This can be a
file on the system
@@ -176,7 +211,16 @@
org.apache.tools.ant.taskdefs.Java javaTask = null;
try {
- String args = "-noexit " + sourceJar.getPath() + " " +
destJar.getPath();
+ String args = additionalArgs;
+ if (keepgenerated) {
+ args += " -keepgenerated";
+ }
+
+ if (compiler != null) {
+ args += " -compiler " + compiler;
+ }
+
+ args += " -noexit " + sourceJar.getPath() + " " +
destJar.getPath();
javaTask = (Java) getTask().getProject().createTask("java");
javaTask.setClassname("weblogic.ejbc");