Browse Source

-d is not an option of javadoc in 1.2 but of the standard doclet.

Submitted by:	Glenn McAllister <glennm@ca.ibm.com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267964 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 25 years ago
parent
commit
5dbbf38ae0
1 changed files with 11 additions and 4 deletions
  1. +11
    -4
      src/main/org/apache/tools/ant/taskdefs/Javadoc.java

+ 11
- 4
src/main/org/apache/tools/ant/taskdefs/Javadoc.java View File

@@ -262,8 +262,6 @@ public class Javadoc extends Task {
}

public void setDestdir(File dir) {
cmd.createArgument().setValue("-d");
cmd.createArgument().setFile(dir);
destDir = dir;
}
public void setSourcefiles(String src) {
@@ -586,8 +584,8 @@ public class Javadoc extends Task {
log("!! javadoc2 is deprecated. Use javadoc instead. !!");
}

if (sourcePath == null || destDir == null ) {
String msg = "sourcePath and destDir attributes must be set!";
if (sourcePath == null) {
String msg = "sourcePath attribute must be set!";
throw new BuildException(msg);
}

@@ -619,6 +617,15 @@ public class Javadoc extends Task {
if (author && doclet == null)
toExecute.createArgument().setValue("-author");

if (javadoc1 || doclet == null) {
if (destDir == null) {
String msg = "destDir attribute must be set!";
throw new BuildException(msg);
}
cmd.createArgument().setValue("-d");
cmd.createArgument().setFile(destDir);
}

// --------------------------------- javadoc2 arguments for default doclet

// XXX: how do we handle a custom doclet?


Loading…
Cancel
Save