Browse Source

JavaDoc doesn't use basedir for sourcePath

PR: 61
Obtained from: will+ant@cs.cmu.edu


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267648 13f79535-47bb-0310-9956-ffa450edef68
master
Sam Ruby 25 years ago
parent
commit
9fd8da35d2
1 changed files with 8 additions and 5 deletions
  1. +8
    -5
      src/main/org/apache/tools/ant/taskdefs/Exec.java

+ 8
- 5
src/main/org/apache/tools/ant/taskdefs/Exec.java View File

@@ -67,7 +67,7 @@ import java.io.*;
public class Exec extends Task {
private String os;
private String out;
private String dir = ".";
private File dir;
private String command;

private static final int BUFFER_SIZE = 512;
@@ -89,15 +89,18 @@ public class Exec extends Task {
return 0;
}

// default directory to the project's base directory
if (dir == null) dir = project.getBaseDir();

if (myos.toLowerCase().indexOf("windows") >= 0) {
if (!dir.equals("."))
command = "cmd /c cd " + project.resolveFile(dir) + " && " + command;
if (!dir.equals(project.resolveFile(".")))
command = "cmd /c cd " + dir + " && " + command;
} else {
String ant = project.getProperty("ant.home");
if (ant == null) throw new BuildException("Property 'ant.home' not found");
String antRun = project.resolveFile(ant + "/bin/antRun").toString();

command = antRun + " " + project.resolveFile(dir) + " " + command;
command = antRun + " " + dir + " " + command;
}

try {
@@ -145,7 +148,7 @@ public class Exec extends Task {
}

public void setDir(String d) {
this.dir = d;
this.dir = project.resolveFile(d);
}

public void setOs(String os) {


Loading…
Cancel
Save