From aea9fac4c0e1961af44bc91298d14edec2ae1f3c Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Fri, 8 Nov 2002 16:07:55 +0000 Subject: [PATCH] -source is a javadoc option, not one of the standard doclet. PR: 13747 git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273524 13f79535-47bb-0310-9956-ffa450edef68 --- WHATSNEW | 2 ++ .../org/apache/tools/ant/taskdefs/Javadoc.java | 16 +++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) 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); } }