Browse Source

Provide access to more ejbc options

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268093 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 24 years ago
parent
commit
cf01e99f9e
1 changed files with 45 additions and 1 deletions
  1. +45
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java

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

@@ -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.
@@ -88,6 +95,15 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
this.classpath = classpath;
}

/**
* 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");


Loading…
Cancel
Save