diff --git a/WHATSNEW b/WHATSNEW index 21b5b1db0..ff8d1ac9b 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -45,6 +45,8 @@ Fixed bugs: * would cause an exception if a pointed to files that do not exist. +* will now pass -source to custom doclets as well. + Other changes: -------------- diff --git a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java index 5d3aae627..2c7a008cd 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java +++ b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java @@ -1462,12 +1462,15 @@ public class Javadoc extends Task { /** * Enables the -source switch, will be ignored if javadoc is not - * the 1.4 version or a different doclet than the standard doclet - * is used. + * the 1.4 version. * * @since Ant 1.5 */ public void setSource(String source) { + if (!javadoc4) { + log ("-source option not supported on JavaDoc < 1.4", + Project.MSG_VERBOSE); + } this.source = source; } @@ -1751,13 +1754,8 @@ public class Javadoc extends Task { } if (source != null) { - if (doclet != null) { - log("ignoring source option for custom doclet", - Project.MSG_WARN); - } else { - toExecute.createArgument().setValue("-source"); - toExecute.createArgument().setValue(source); - } + toExecute.createArgument().setValue("-source"); + toExecute.createArgument().setValue(source); } }