quoted if they contain spaces in JDK 1.4's javadoc. PR: 16871 Enable usage of standard tags in <tag> by making description optional. PR: 18912 Support the -noqualifier switch. PR: 19288 Add nested <arg> as a more convenient alternative to additionalparams. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274578 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -124,6 +124,9 @@ Fixed bugs: | |||||
| * URL-encoding in <vaj*port> didn't work properly. | * URL-encoding in <vaj*port> didn't work properly. | ||||
| * file names that include spaces need to be quoted inside the @argfile | |||||
| argument using <javadoc> and JDK 1.4. Bugzilla Report 16871. | |||||
| Other changes: | Other changes: | ||||
| -------------- | -------------- | ||||
| * Six new Clearcase tasks added. | * Six new Clearcase tasks added. | ||||
| @@ -319,6 +322,15 @@ Other changes: | |||||
| * A new task <rexec> has been added that requires commons-net to work. | * A new task <rexec> has been added that requires commons-net to work. | ||||
| Bugzilla Report 19541. | Bugzilla Report 19541. | ||||
| * <javadoc> now supports a nested <arg> element in addition to the | |||||
| additionalparams attribute. | |||||
| * You can now determine the order of standard tags in <javadoc> via | |||||
| <tag> elements - you must not use the description attribute for them. | |||||
| Bugzilla Report 18912. | |||||
| * <javadoc> now supports the -noqualifier switch. Bugzilla Report 19288. | |||||
| Changes from Ant 1.5.2 to Ant 1.5.3 | Changes from Ant 1.5.2 to Ant 1.5.3 | ||||
| =================================== | =================================== | ||||
| @@ -416,6 +416,14 @@ means any VM of at least version 1.2.</p> | |||||
| <td align="center" valign="top">1.4+</td> | <td align="center" valign="top">1.4+</td> | ||||
| <td align="center" valign="top">No</td> | <td align="center" valign="top">No</td> | ||||
| </tr> | </tr> | ||||
| <tr> | |||||
| <td valign="top">noqualifier</td> | |||||
| <td valign="top">Enables the <code>-noqualifier</code> argument - | |||||
| must be <code>all</code> or a colon separated list of packages. | |||||
| <em>since Ant 1.6</em>.</td> | |||||
| <td align="center" valign="top">1.4+</td> | |||||
| <td align="center" valign="top">No</td> | |||||
| </tr> | |||||
| </table> | </table> | ||||
| <h4><a name="groupattribute">Format of the group attribute</a></h4> | <h4><a name="groupattribute">Format of the group attribute</a></h4> | ||||
| @@ -608,6 +616,10 @@ of the doclet element is shown below:</p> | |||||
| <p>The tag nested element is used to specify custom tags. This option | <p>The tag nested element is used to specify custom tags. This option | ||||
| is only available with Java 1.4.</p> | is only available with Java 1.4.</p> | ||||
| <p>If you want to specify a standard tag using a nested tag element | |||||
| because you want to determine the order the tags are output, you must | |||||
| not set the description attribute for those tags.</p> | |||||
| <h5>Parameters</h5> | <h5>Parameters</h5> | ||||
| <table width="60%" border="1" cellpadding="2" cellspacing="0"> | <table width="60%" border="1" cellpadding="2" cellspacing="0"> | ||||
| <tr> | <tr> | ||||
| @@ -623,7 +635,8 @@ is only available with Java 1.4.</p> | |||||
| <tr> | <tr> | ||||
| <td valign="top">description</td> | <td valign="top">description</td> | ||||
| <td valign="top">Description for tag (e.g. <code>To do:</code>)</td> | <td valign="top">Description for tag (e.g. <code>To do:</code>)</td> | ||||
| <td align="center" valign="top">Yes, unless the <code>dir</code> attribute is specified.</td> | |||||
| <td align="center" valign="top">Yes, unless the <code>dir</code> | |||||
| attribute is specified or name is a standard tag.</td> | |||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <td valign="top">enabled</td> | <td valign="top">enabled</td> | ||||
| @@ -690,6 +703,12 @@ structure</a> and can also be set via nested <i>sourcepath</i>, | |||||
| <i>classpath</i> and <i>bootclasspath</i> elements | <i>classpath</i> and <i>bootclasspath</i> elements | ||||
| respectively.</p> | respectively.</p> | ||||
| <h4>arg</h4> | |||||
| <p>Use nested <code><arg></code> to specify additional | |||||
| arguments. See <a href="../using.html#arg">Command line | |||||
| arguments</a>. <em>Since Ant 1.6</em></p> | |||||
| <h3>Example</h3> | <h3>Example</h3> | ||||
| <pre> <javadoc packagenames="com.dummy.test.*" | <pre> <javadoc packagenames="com.dummy.test.*" | ||||
| sourcepath="src" | sourcepath="src" | ||||
| @@ -468,6 +468,7 @@ public class Javadoc extends Task { | |||||
| private String source = null; | private String source = null; | ||||
| private boolean linksource = false; | private boolean linksource = false; | ||||
| private boolean breakiterator = false; | private boolean breakiterator = false; | ||||
| private String noqualifier; | |||||
| private Vector fileSets = new Vector(); | private Vector fileSets = new Vector(); | ||||
| private Vector packageSets = new Vector(); | private Vector packageSets = new Vector(); | ||||
| @@ -518,6 +519,14 @@ public class Javadoc extends Task { | |||||
| cmd.createArgument().setLine(add); | cmd.createArgument().setLine(add); | ||||
| } | } | ||||
| /** | |||||
| * Adds a command-line argument. | |||||
| * @since Ant 1.6 | |||||
| */ | |||||
| public Commandline.Argument createArg() { | |||||
| return cmd.createArgument(); | |||||
| } | |||||
| /** | /** | ||||
| * Specify where to find source file | * Specify where to find source file | ||||
| * | * | ||||
| @@ -1382,13 +1391,12 @@ public class Javadoc extends Task { | |||||
| if (name == null || name.equals("")) { | if (name == null || name.equals("")) { | ||||
| throw new BuildException ("No name specified for custom tag."); | throw new BuildException ("No name specified for custom tag."); | ||||
| } | } | ||||
| if (description == null || description.equals("")){ | |||||
| throw new BuildException | |||||
| ("No description specified for custom tag " + name); | |||||
| if (description != null) { | |||||
| return name + ":" + (enabled ? "" : "X") | |||||
| + scope + ":" + description; | |||||
| } else { | |||||
| return name; | |||||
| } | } | ||||
| return name + ":" + (enabled ? "" : "X") | |||||
| + scope + ":" + description; | |||||
| } | } | ||||
| } | } | ||||
| @@ -1532,6 +1540,20 @@ public class Javadoc extends Task { | |||||
| this.breakiterator = b; | this.breakiterator = b; | ||||
| } | } | ||||
| /** | |||||
| * Enables the -noqualifier switch, will be ignored if javadoc is not | |||||
| * the 1.4 version. | |||||
| * | |||||
| * @since Ant 1.5 | |||||
| */ | |||||
| public void setNoqualifier(String noq) { | |||||
| if (!javadoc4) { | |||||
| log ("-noqualifier option not supported on JavaDoc < 1.4", | |||||
| Project.MSG_VERBOSE); | |||||
| } | |||||
| this.noqualifier = noqualifier; | |||||
| } | |||||
| public void execute() throws BuildException { | public void execute() throws BuildException { | ||||
| if ("javadoc2".equals(getTaskType())) { | if ("javadoc2".equals(getTaskType())) { | ||||
| log("!! javadoc2 is deprecated. Use javadoc instead. !!"); | log("!! javadoc2 is deprecated. Use javadoc instead. !!"); | ||||
| @@ -1830,6 +1852,10 @@ public class Javadoc extends Task { | |||||
| if (breakiterator && doclet == null) { | if (breakiterator && doclet == null) { | ||||
| toExecute.createArgument().setValue("-breakiterator"); | toExecute.createArgument().setValue("-breakiterator"); | ||||
| } | } | ||||
| if (noqualifier != null && doclet == null) { | |||||
| toExecute.createArgument().setValue("-noqualifier"); | |||||
| toExecute.createArgument().setValue(noqualifier); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| @@ -1868,7 +1894,11 @@ public class Javadoc extends Task { | |||||
| SourceFile sf = (SourceFile) enum.nextElement(); | SourceFile sf = (SourceFile) enum.nextElement(); | ||||
| String sourceFileName = sf.getFile().getAbsolutePath(); | String sourceFileName = sf.getFile().getAbsolutePath(); | ||||
| if (useExternalFile) { | if (useExternalFile) { | ||||
| srcListWriter.println(sourceFileName); | |||||
| if (javadoc4 && sourceFileName.indexOf(" ") > -1) { | |||||
| srcListWriter.println("\"" + sourceFileName + "\""); | |||||
| } else { | |||||
| srcListWriter.println(sourceFileName); | |||||
| } | |||||
| } else { | } else { | ||||
| toExecute.createArgument().setValue(sourceFileName); | toExecute.createArgument().setValue(sourceFileName); | ||||
| } | } | ||||