bodewig 02/05/10 09:06:32
Modified: . Tag: ANT_15_BRANCH WHATSNEW
src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH
Javadoc.java
src/main/org/apache/tools/ant/types Tag: ANT_15_BRANCH
Path.java
Log:
If the user specifies a sourcepath in <javadoc> add all existing parts
to the -sourcepath switch, not only those holding packages we want to
doc. Ant 1.4.1's javadoc did so as well, so this is a regression that
needed a fix.
Submitted by: Matthieu Bentot <[EMAIL PROTECTED]>
Revision Changes Path
No revision
No revision
1.263.2.14 +4 -0 jakarta-ant/WHATSNEW
Index: WHATSNEW
===================================================================
RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
retrieving revision 1.263.2.13
retrieving revision 1.263.2.14
diff -u -r1.263.2.13 -r1.263.2.14
--- WHATSNEW 10 May 2002 15:14:58 -0000 1.263.2.13
+++ WHATSNEW 10 May 2002 16:06:31 -0000 1.263.2.14
@@ -40,6 +40,10 @@
* <replaceregexp> didn't work for nested <fileset>s.
+* <javadoc> dropped sourcepath entries if no "interesting" .java
+source files could be found below them. This has been backwards
+incompatible and caused problems with custom doclets like xdoclet.
+
Other changes:
--------------
No revision
No revision
1.96.2.2 +7 -0
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
Index: Javadoc.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v
retrieving revision 1.96.2.1
retrieving revision 1.96.2.2
diff -u -r1.96.2.1 -r1.96.2.2
--- Javadoc.java 1 May 2002 12:21:35 -0000 1.96.2.1
+++ Javadoc.java 10 May 2002 16:06:32 -0000 1.96.2.2
@@ -1436,6 +1436,11 @@
Vector packagesToDoc = new Vector();
Path sourceDirs = new Path(getProject());
+
+ if (sourcePath != null) {
+ sourceDirs.addExisting(sourcePath);
+ }
+
parsePackages(packagesToDoc, sourceDirs);
if (packagesToDoc.size() != 0 && sourceDirs.size() == 0) {
@@ -1871,6 +1876,8 @@
}
}
if (containsPackages) {
+ // We don't need to care for duplicates here,
+ // Path.list does it for us.
sp.createPathElement().setLocation(baseDir);
} else {
log(baseDir + " doesn\'t contain any packages, dropping it.",
No revision
No revision
1.38.2.1 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/types/Path.java
Index: Path.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/Path.java,v
retrieving revision 1.38
retrieving revision 1.38.2.1
diff -u -r1.38 -r1.38.2.1
--- Path.java 26 Apr 2002 16:06:52 -0000 1.38
+++ Path.java 10 May 2002 16:06:32 -0000 1.38.2.1
@@ -240,7 +240,7 @@
*/
public void append(Path other) {
if (other == null) {
- return;
+ return;
}
String[] l = other.list();
for (int i = 0; i < l.length; i++) {
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>