ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Javadoc.java
Date Tue, 05 Sep 2000 14:35:42 GMT
bodewig     00/09/05 07:35:40

  Modified:    src/main/org/apache/tools/ant/taskdefs Javadoc.java
  Log:
  -d is not an option of javadoc in 1.2 but of the standard doclet.
  Submitted by:	Glenn McAllister <glennm@ca.ibm.com>
  
  Revision  Changes    Path
  1.31      +11 -4     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
  
  Index: Javadoc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- Javadoc.java	2000/09/05 12:32:32	1.30
  +++ Javadoc.java	2000/09/05 14:35:38	1.31
  @@ -262,8 +262,6 @@
       }
   
       public void setDestdir(File dir) {
  -        cmd.createArgument().setValue("-d");
  -        cmd.createArgument().setFile(dir);
           destDir = dir;
       }
       public void setSourcefiles(String src) {
  @@ -586,8 +584,8 @@
               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);
           }
   
  @@ -618,6 +616,15 @@
               toExecute.createArgument().setValue("-version");
           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
   
  
  
  

Mime
View raw message