summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConor MacNeill <conor@apache.org>2000-10-16 09:41:22 +0000
committerConor MacNeill <conor@apache.org>2000-10-16 09:41:22 +0000
commitcf01e99f9e236a5e394c1a8106e35668b98f579b (patch)
treea1e3f93294700c0bf9f1e1d2f0c6a2986c6afb72
parenta58b5083c49b0e8f202d6843d65ff9b4a6ce2c78 (diff)
downloadant-cf01e99f9e236a5e394c1a8106e35668b98f579b.tar.gz
Provide access to more ejbc options
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268093 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java46
1 files changed, 45 insertions, 1 deletions
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
index b846c9afc..e336b386e 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
@@ -79,7 +79,14 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
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 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
}
/**
+ * 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 class WeblogicDeploymentTool extends GenericDeploymentTool {
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 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
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");