Browse Source

Merge in my patches from the 1.3 branch.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268676 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 24 years ago
parent
commit
41f7afa119
3 changed files with 4 additions and 7 deletions
  1. +0
    -3
      build.xml
  2. +4
    -3
      src/main/org/apache/tools/ant/types/CommandlineJava.java
  3. +0
    -1
      src/testcases/org/apache/tools/ant/taskdefs/ExecuteWatchdogTest.java

+ 0
- 3
build.xml View File

@@ -558,9 +558,6 @@
<exclude name="org/apache/tools/ant/taskdefs/TaskdefsTest.java" /> <exclude name="org/apache/tools/ant/taskdefs/TaskdefsTest.java" />
<exclude name="org/apache/tools/ant/util/regexp/RegexpMatcherTest.java" /> <exclude name="org/apache/tools/ant/util/regexp/RegexpMatcherTest.java" />


<!-- currently fails - will be sorted out soon -->
<exclude name="org/apache/tools/ant/types/CommandlineJavaTest.java" />

<!-- these depend on order --> <!-- these depend on order -->
<exclude name="org/apache/tools/ant/taskdefs/GUnzipTest.java" /> <exclude name="org/apache/tools/ant/taskdefs/GUnzipTest.java" />
<exclude name="org/apache/tools/ant/taskdefs/GzipTest.java" /> <exclude name="org/apache/tools/ant/taskdefs/GzipTest.java" />


+ 4
- 3
src/main/org/apache/tools/ant/types/CommandlineJava.java View File

@@ -172,9 +172,10 @@ public class CommandlineJava implements Cloneable {
} }


public String[] getCommandline() { public String[] getCommandline() {
Path fullClasspath = classpath != null ? classpath.concatSystemClasspath("ignore") : null;
int size = int size =
vmCommand.size() + javaCommand.size() + sysProperties.size(); vmCommand.size() + javaCommand.size() + sysProperties.size();
if (classpath != null && classpath.size() > 0) {
if (fullClasspath != null && fullClasspath.size() > 0) {
size += 2; size += 2;
} }
@@ -188,9 +189,9 @@ public class CommandlineJava implements Cloneable {
result, pos, sysProperties.size()); result, pos, sysProperties.size());
pos += sysProperties.size(); pos += sysProperties.size();
} }
if (classpath != null && classpath.size() > 0) {
if (fullClasspath != null && fullClasspath.size() > 0) {
result[pos++] = "-classpath"; result[pos++] = "-classpath";
result[pos++] = classpath.concatSystemClasspath("ignore").toString();
result[pos++] = fullClasspath.toString();
} }
System.arraycopy(javaCommand.getCommandline(), 0, System.arraycopy(javaCommand.getCommandline(), 0,
result, pos, javaCommand.size()); result, pos, javaCommand.size());


+ 0
- 1
src/testcases/org/apache/tools/ant/taskdefs/ExecuteWatchdogTest.java View File

@@ -89,7 +89,6 @@ public class ExecuteWatchdogTest extends TestCase {
System.err.println("WARNING: 'build.tests' property is not available !"); System.err.println("WARNING: 'build.tests' property is not available !");
classpath = System.getProperty("java.class.path"); classpath = System.getProperty("java.class.path");
} }
System.out.println("Using classpath: " + classpath);
return classpath; return classpath;
} }




Loading…
Cancel
Save