Hello,

I am relatively new to Ant, but I am really excited about what I have seen
so far.  Thanks for making such a great tool available.


While playing around with Ant, I noticed that the docletpath option on the
Javadoc task doesn't work. The setDocletpath method is there, but the docletpath
never get included in the actual javadoc command. I have attached a very simple patch
that will fix this problem.


Thanks,
Jay Handfield
Index: src/main/org/apache/tools/ant/taskdefs/Javadoc.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v
retrieving revision 1.7
diff -u -r1.7 Javadoc.java
--- src/main/org/apache/tools/ant/taskdefs/Javadoc.java 2000/03/03 14:15:42     
1.7
+++ src/main/org/apache/tools/ant/taskdefs/Javadoc.java 2000/03/16 13:52:35
@@ -91,7 +91,7 @@
     private boolean author = true;
     private boolean version = true;
     private String doclet = null;
-    private File docletpath = null;
+    private String docletpath = null;
     private boolean old = false;
     private String classpath = null;
     private String bootclasspath = null;
@@ -151,7 +151,7 @@
         doclet = src;
     }
     public void setDocletPath(String src) {
-        docletpath = project.resolveFile(src);
+        docletpath = project.translatePath(src);
     }
     public void setOld(String src) {
         old = Project.toBoolean(src);
@@ -235,6 +235,7 @@
         docencoding = src;
     }
 
+
     public void execute() throws BuildException {
         if (sourcePath == null && destDir == null ) {
             String msg = "sourcePath and destDir attributes must be set!";
@@ -321,6 +322,10 @@
             if (doclet != null) {
                 argList.addElement("-doclet");
                 argList.addElement(doclet);
+            }
+            if (docletpath != null) {
+                argList.addElement("-docletpath");
+                argList.addElement(docletpath);
             }
             if (bootclasspath != null) {
                 argList.addElement("-bootclasspath");

Reply via email to