Browse Source

Linked the compiler used by ejbjar to the build.compiler property. This

linking can be overidden by either supplying a value to the compiler attribute
or setting that attribute to "default", in which case ejbc's default compiler
choise will be used.

PR:	1146
Suggested by:	David Ventimiglia <david.ventimiglia@msdw.com>


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

+ 5
- 1
docs/manual/OptionalTasks/ejb.html View File

@@ -777,7 +777,11 @@ define this as META-INF/Customer-weblogic-cmp-rdbms-jar.xml.</p>
<td valign="top">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.</td>
compile with the Jikes compiler. If this is not set
and the <code>build.compiler</code> property is set
to jikes, the Jikes compiler will be used. If this
is not desired, the value &quot;<code>default</code>&quot;
may be given to use the default compiler</td>
<td valign="top" align="center">No</td>
</tr>
<tr>


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

@@ -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());


Loading…
Cancel
Save