ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Javadoc.java
Date Tue, 18 Feb 2003 15:19:07 GMT
bodewig     2003/02/18 07:19:06

  Modified:    src/main/org/apache/tools/ant/taskdefs Javadoc.java
  Log:
  <http://java.sun.com/products/jdk/1.2/docs/tooldocs/solaris/javadoc.html#linkoffline>
  says the second arg to linkoffline must be an URL.  The docs for JDK
  1.3 and later say URL or file, but comments in
  
  PR: 10964
  
  indicate it doesn't work that way.
  
  Revision  Changes    Path
  1.107     +20 -10    ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
  
  Index: Javadoc.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v
  retrieving revision 1.106
  retrieving revision 1.107
  diff -u -r1.106 -r1.107
  --- Javadoc.java	10 Feb 2003 14:13:35 -0000	1.106
  +++ Javadoc.java	18 Feb 2003 15:19:05 -0000	1.107
  @@ -1661,18 +1661,28 @@
                           File packageListLocation = la.getPackagelistLoc();
                           if (packageListLocation == null) {
                               throw new BuildException("The package list "
  -                                + " location for link " + la.getHref()
  -                                + " must be provided because the link is "
  -                                + "offline");
  +                                                     + " location for link " + la.getHref()
  +                                                     + " must be provided because the link
is "
  +                                                     + "offline");
                           }
                           File packageListFile =
                               new File(packageListLocation, "package-list");
                           if (packageListFile.exists()) {
  -                            toExecute.createArgument().setValue("-linkoffline");
  -                            toExecute.createArgument().setValue(la.getHref());
  -                            toExecute.createArgument()
  -                                .setValue(packageListLocation
  -                                          .getAbsolutePath());
  +                            try {
  +                                String packageListURL =
  +                                    fileUtils.getFileURL(packageListLocation)
  +                                    .toExternalForm();
  +                                toExecute.createArgument()
  +                                    .setValue("-linkoffline");
  +                                toExecute.createArgument()
  +                                    .setValue(la.getHref());
  +                                toExecute.createArgument()
  +                                    .setValue(packageListURL);
  +                            } catch (MalformedURLException ex) {
  +                                log("Warning: Package list location was "
  +                                    + "invalid " + packageListLocation,
  +                                    Project.MSG_WARN);
  +                            }
                           } else {
                               log("Warning: No package list was found at "
                                   + packageListLocation, Project.MSG_VERBOSE);
  @@ -1776,8 +1786,8 @@
                           .setValue("@" + tmpList.getAbsolutePath());
                   }
                   srcListWriter = new PrintWriter(
  -                                    new FileWriter(tmpList.getAbsolutePath(),
  -                                                   true));
  +                                                new FileWriter(tmpList.getAbsolutePath(),
  +                                                               true));
               }
   
               Enumeration enum = packagesToDoc.elements();
  
  
  

Mime
View raw message