Browse Source

Pass -noexit flag to weblogic.rmic

PR: 1333


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269003 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 24 years ago
parent
commit
cc8afe2788
2 changed files with 19 additions and 2 deletions
  1. +17
    -0
      src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
  2. +2
    -2
      src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java

+ 17
- 0
src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java View File

@@ -180,7 +180,24 @@ public abstract class DefaultRmicAdapter implements RmicAdapter {
* setup rmic argument for rmic.
*/
protected Commandline setupRmicCommand() {
return setupRmicCommand(null);
}

/**
* setup rmic argument for rmic.
*
* @param options additional parameters needed by a specific
* implementation.
*/
protected Commandline setupRmicCommand(String[] options) {
Commandline cmd = new Commandline();

if (options != null) {
for (int i=0; i<options.length; i++) {
cmd.createArgument().setValue(options[i]);
}
}

Path classpath = getCompileClasspath();

cmd.createArgument().setValue("-d");


+ 2
- 2
src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java View File

@@ -73,7 +73,7 @@ public class WLRmic extends DefaultRmicAdapter {

public boolean execute() throws BuildException {
getRmic().log("Using WebLogic rmic", Project.MSG_VERBOSE);
Commandline cmd = setupRmicCommand();
Commandline cmd = setupRmicCommand(new String[] {"-noexit"});

PrintStream err = System.err;
PrintStream out = System.out;
@@ -88,7 +88,7 @@ public class WLRmic extends DefaultRmicAdapter {
Class c = Class.forName("weblogic.rmic");
Method doRmic = c.getMethod("main",
new Class [] { String[].class });
doRmic.invoke(null, new Object[] { cmd.getArguments() });
doRmic.invoke(null, new Object[] { });
return true;
} catch (ClassNotFoundException ex) {
throw new BuildException("Cannot use WebLogic rmic, as it is not available"+


Loading…
Cancel
Save