Browse Source

<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.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274129 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
6b4bd1e75a
1 changed files with 20 additions and 10 deletions
  1. +20
    -10
      src/main/org/apache/tools/ant/taskdefs/Javadoc.java

+ 20
- 10
src/main/org/apache/tools/ant/taskdefs/Javadoc.java View File

@@ -1661,18 +1661,28 @@ public class Javadoc extends Task {
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 @@ public class Javadoc extends Task {
.setValue("@" + tmpList.getAbsolutePath());
}
srcListWriter = new PrintWriter(
new FileWriter(tmpList.getAbsolutePath(),
true));
new FileWriter(tmpList.getAbsolutePath(),
true));
}

Enumeration enum = packagesToDoc.elements();


Loading…
Cancel
Save