Browse Source

If the package list cannot be found, the offline links are

skipped - a message is printed at verbose level

PR:`	1304


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269293 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 24 years ago
parent
commit
21a88b996a
1 changed files with 13 additions and 6 deletions
  1. +13
    -6
      src/main/org/apache/tools/ant/taskdefs/Javadoc.java

+ 13
- 6
src/main/org/apache/tools/ant/taskdefs/Javadoc.java View File

@@ -626,8 +626,8 @@ public class Javadoc extends Task {
packagelistLoc = src; packagelistLoc = src;
} }
public String getPackagelistLoc() {
return packagelistLoc.getAbsolutePath();
public File getPackagelistLoc() {
return packagelistLoc;
} }
public void setOffline(boolean offline) { public void setOffline(boolean offline) {
@@ -810,14 +810,21 @@ public class Javadoc extends Task {
} }
if (la.isLinkOffline()) { if (la.isLinkOffline()) {
String packageListLocation = la.getPackagelistLoc();
File packageListLocation = la.getPackagelistLoc();
if (packageListLocation == null) { if (packageListLocation == null) {
throw new BuildException("The package list location for link " + la.getHref() + throw new BuildException("The package list location for link " + la.getHref() +
" must be provided because the link is offline"); " must be provided because the link is offline");
} }
toExecute.createArgument().setValue("-linkoffline");
toExecute.createArgument().setValue(la.getHref());
toExecute.createArgument().setValue(packageListLocation);
File packageList = new File(packageListLocation, "package-list");
if (packageList.exists()) {
toExecute.createArgument().setValue("-linkoffline");
toExecute.createArgument().setValue(la.getHref());
toExecute.createArgument().setValue(packageListLocation.getAbsolutePath());
}
else {
log("Warning: No package list was found at " + packageListLocation,
Project.MSG_VERBOSE);
}
} }
else { else {
toExecute.createArgument().setValue("-link"); toExecute.createArgument().setValue("-link");


Loading…
Cancel
Save