diff --git a/docs/manual/OptionalTasks/ejb.html b/docs/manual/OptionalTasks/ejb.html
index 060b2cbb3..1346ed8f9 100644
--- a/docs/manual/OptionalTasks/ejb.html
+++ b/docs/manual/OptionalTasks/ejb.html
@@ -777,7 +777,11 @@ define this as META-INF/Customer-weblogic-cmp-rdbms-jar.xml.
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. |
+ compile with the Jikes compiler. If this is not set
+ and the build.compiler
property is set
+ to jikes, the Jikes compiler will be used. If this
+ is not desired, the value "default
"
+ may be given to use the default compiler
No |
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 6d5451ad5..a62a8d1a7 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
@@ -90,6 +90,8 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
protected static final String DEFAULT_WL60_DTD_LOCATION
= "/weblogic/ejb20/dd/xml/weblogic600-ejb-jar.dtd";
+ protected static final String DEFAULT_COMPILER = "default";
+
protected static final String WL_DD = "weblogic-ejb-jar.xml";
protected static final String WL_CMP_DD = "weblogic-cmp-rdbms-jar.xml";
@@ -421,9 +423,20 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
if (keepgenerated) {
javaTask.createArg().setValue("-keepgenerated");
}
- if (compiler != null) {
- javaTask.createArg().setValue("-compiler");
- javaTask.createArg().setValue(compiler);
+ if (compiler == null) {
+ // try to use the compiler specified by build.compiler. Right now we are just going
+ // to allow Jikes
+ String buildCompiler = getTask().getProject().getProperty("build.compiler");
+ if (buildCompiler.equals("jikes")) {
+ javaTask.createArg().setValue("-compiler");
+ javaTask.createArg().setValue("jikes");
+ }
+ }
+ else {
+ if (!compiler.equals(DEFAULT_COMPILER)) {
+ javaTask.createArg().setValue("-compiler");
+ javaTask.createArg().setValue(compiler);
+ }
}
javaTask.createArg().setValue(sourceJar.getPath());
javaTask.createArg().setValue(destJar.getPath());