bodewig 2003/05/14 08:01:12
Modified: . WHATSNEW docs/manual/CoreTasks javadoc.html src/main/org/apache/tools/ant/taskdefs Javadoc.java Log: Similar to PR: 10499, filenames passed in via @argfile needs to be 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. Revision Changes Path 1.418 +12 -0 ant/WHATSNEW Index: WHATSNEW =================================================================== RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.417 retrieving revision 1.418 diff -u -r1.417 -r1.418 --- WHATSNEW 14 May 2003 12:40:17 -0000 1.417 +++ WHATSNEW 14 May 2003 15:01:12 -0000 1.418 @@ -124,6 +124,9 @@ * 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: -------------- * Six new Clearcase tasks added. @@ -318,6 +321,15 @@ * A new task <rexec> has been added that requires commons-net to work. 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 =================================== 1.25 +20 -1 ant/docs/manual/CoreTasks/javadoc.html Index: javadoc.html =================================================================== RCS file: /home/cvs/ant/docs/manual/CoreTasks/javadoc.html,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- javadoc.html 17 Apr 2003 13:41:25 -0000 1.24 +++ javadoc.html 14 May 2003 15:01:12 -0000 1.25 @@ -416,6 +416,14 @@ <td align="center" valign="top">1.4+</td> <td align="center" valign="top">No</td> </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> <h4><a name="groupattribute">Format of the group attribute</a></h4> @@ -608,6 +616,10 @@ <p>The tag nested element is used to specify custom tags. This option 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> <table width="60%" border="1" cellpadding="2" cellspacing="0"> <tr> @@ -623,7 +635,8 @@ <tr> <td valign="top">description</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> <td valign="top">enabled</td> @@ -689,6 +702,12 @@ structure</a> and can also be set via nested <i>sourcepath</i>, <i>classpath</i> and <i>bootclasspath</i> elements 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> <pre> <javadoc packagenames="com.dummy.test.*" 1.113 +37 -7 ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java Index: Javadoc.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v retrieving revision 1.112 retrieving revision 1.113 diff -u -r1.112 -r1.113 --- Javadoc.java 17 Apr 2003 13:41:25 -0000 1.112 +++ Javadoc.java 14 May 2003 15:01:12 -0000 1.113 @@ -468,6 +468,7 @@ private String source = null; private boolean linksource = false; private boolean breakiterator = false; + private String noqualifier; private Vector fileSets = new Vector(); private Vector packageSets = new Vector(); @@ -519,6 +520,14 @@ } /** + * Adds a command-line argument. + * @since Ant 1.6 + */ + public Commandline.Argument createArg() { + return cmd.createArgument(); + } + + /** * Specify where to find source file * * @param src a Path instance containing the various source directories. @@ -1382,13 +1391,12 @@ if (name == null || name.equals("")) { 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 @@ 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 { if ("javadoc2".equals(getTaskType())) { log("!! javadoc2 is deprecated. Use javadoc instead. !!"); @@ -1830,6 +1852,10 @@ if (breakiterator && doclet == null) { toExecute.createArgument().setValue("-breakiterator"); } + if (noqualifier != null && doclet == null) { + toExecute.createArgument().setValue("-noqualifier"); + toExecute.createArgument().setValue(noqualifier); + } } } @@ -1868,7 +1894,11 @@ SourceFile sf = (SourceFile) enum.nextElement(); String sourceFileName = sf.getFile().getAbsolutePath(); if (useExternalFile) { - srcListWriter.println(sourceFileName); + if (javadoc4 && sourceFileName.indexOf(" ") > -1) { + srcListWriter.println("\"" + sourceFileName + "\""); + } else { + srcListWriter.println(sourceFileName); + } } else { toExecute.createArgument().setValue(sourceFileName); }