bodewig 2005/03/17 01:38:59
Modified: . Tag: ANT_16_BRANCH WHATSNEW
docs/manual/CoreTasks Tag: ANT_16_BRANCH javadoc.html
src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH
Javadoc.java
Log:
merge
Revision Changes Path
No revision
No revision
1.503.2.202 +4 -0 ant/WHATSNEW
Index: WHATSNEW
===================================================================
RCS file: /home/cvs/ant/WHATSNEW,v
retrieving revision 1.503.2.201
retrieving revision 1.503.2.202
diff -u -r1.503.2.201 -r1.503.2.202
--- WHATSNEW 17 Mar 2005 08:13:56 -0000 1.503.2.201
+++ WHATSNEW 17 Mar 2005 09:38:59 -0000 1.503.2.202
@@ -306,6 +306,10 @@
This was confusing so the definitions are now treated as similar.
Bugzilla Report 31215.
+* <javadoc> has a new attribute "includenosourcepackages" that can be
+ used to document packages that don't hold source files but a
+ package.html file. Bugzilla Report 25339.
+
Fixed bugs:
-----------
No revision
No revision
1.26.2.6 +11 -2 ant/docs/manual/CoreTasks/javadoc.html
Index: javadoc.html
===================================================================
RCS file: /home/cvs/ant/docs/manual/CoreTasks/javadoc.html,v
retrieving revision 1.26.2.5
retrieving revision 1.26.2.6
diff -u -r1.26.2.5 -r1.26.2.6
--- javadoc.html 17 Mar 2005 09:11:11 -0000 1.26.2.5
+++ javadoc.html 17 Mar 2005 09:38:59 -0000 1.26.2.6
@@ -433,6 +433,14 @@
<td align="center" valign="top">1.4+</td>
<td align="center" valign="top">No</td>
</tr>
+ <tr>
+ <td valign="top">includenosourcepackages</td>
+ <td valign="top">If set to true, packages that don't contain Java
+ source but a package.html will get documented as well.
+ <em>since Ant 1.6.3</em>.</td>
+ <td align="center" valign="top">all</td>
+ <td align="center" valign="top">No (default is <code>false</code>)</td>
+ </tr>
</table>
<h4><a name="groupattribute">Format of the group attribute</a></h4>
@@ -465,8 +473,9 @@
<p>A <a href="../CoreTypes/fileset.html">FileSet</a>. All matched
files will be passed to javadoc as source files. Ant will
-automatically add the include pattern <code>**/*.java</code> to these
-filesets.</p>
+automatically add the include pattern <code>**/*.java</code> (and
+<code>**/package.html</code> if inncludenosourcepackages is true) to
+these filesets.</p>
<p>Nested filesets can be used to document sources that are in the
default package or if you want to exclude certain files from
No revision
No revision
1.124.2.7 +17 -5 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.124.2.6
retrieving revision 1.124.2.7
diff -u -r1.124.2.6 -r1.124.2.7
--- Javadoc.java 17 Mar 2005 09:11:11 -0000 1.124.2.6
+++ Javadoc.java 17 Mar 2005 09:38:59 -0000 1.124.2.7
@@ -433,6 +433,7 @@
private boolean linksource = false;
private boolean breakiterator = false;
private String noqualifier;
+ private boolean includeNoSourcePackages = false;
private Vector fileSets = new Vector();
private Vector packageSets = new Vector();
@@ -1572,6 +1573,15 @@
this.noqualifier = noqualifier;
}
+ /**
+ * If set to true, Ant will also accept packages that only hold
+ * package.html files but no Java sources.
+ * @since Ant 1.6.3
+ */
+ public void setIncludeNoSourcePackages(boolean b) {
+ this.includeNoSourcePackages = b;
+ }
+
public void execute() throws BuildException {
if ("javadoc2".equals(getTaskType())) {
log("!! javadoc2 is deprecated. Use javadoc instead. !!");
@@ -1722,7 +1732,7 @@
getProject().resolveFile(la.getHref());
if (hrefAsFile.exists()) {
try {
- link = FILE_UTILS.getFileURL(hrefAsFile)
+ link = fileUtils.getFileURL(hrefAsFile)
.toExternalForm();
} catch (MalformedURLException ex) {
// should be impossible
@@ -2010,6 +2020,9 @@
if (!fs.hasPatterns() && !fs.hasSelectors()) {
fs = (FileSet) fs.clone();
fs.createInclude().setName("**/*.java");
+ if (includeNoSourcePackages) {
+ fs.createInclude().setName("**/package.html");
+ }
}
File baseDir = fs.getDir(getProject());
DirectoryScanner ds = fs.getDirectoryScanner(getProject());
@@ -2082,10 +2095,9 @@
File pd = new File(baseDir, dirs[i]);
String[] files = pd.list(new FilenameFilter () {
public boolean accept(File dir1, String name) {
- if (name.endsWith(".java")) {
- return true;
- }
- return false; // ignore dirs
+ return name.endsWith(".java")
+ || (includeNoSourcePackages
+ && name.equals("package.html"));
}
});
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
|