Browse Source

#41264: In Ant 1.7.0, <fileset> in <javadoc> does not by default include

only **/*.java as the documentation claims and earlier revisions did.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@491150 13f79535-47bb-0310-9956-ffa450edef68
master
Jesse N. Glick 18 years ago
parent
commit
6672d9d6c7
4 changed files with 26 additions and 3 deletions
  1. +5
    -0
      WHATSNEW
  2. +12
    -0
      src/etc/testcases/taskdefs/javadoc/javadoc.xml
  3. +4
    -3
      src/main/org/apache/tools/ant/taskdefs/Javadoc.java
  4. +5
    -0
      src/tests/junit/org/apache/tools/ant/taskdefs/JavadocTest.java

+ 5
- 0
WHATSNEW View File

@@ -6,6 +6,11 @@ Changes that could break older environments:

Fixed bugs:
-----------

* In Ant 1.7.0, <fileset> in <javadoc> does not by default include only
**/*.java as the documentation claims and earlier revisions did.
Bugzilla report 41264.

* SPI support in jar was broken.
Bugzilla report 41201.


+ 12
- 0
src/etc/testcases/taskdefs/javadoc/javadoc.xml View File

@@ -139,4 +139,16 @@
<fileset refid="fileset.simple" />
</javadoc>
</target>

<target name="nonJavaIncludes">
<delete dir="${javadoc}"/>
<mkdir dir="${javadoc}"/>
<echo file="${javadoc}/stuff1.java">public class stuff1 {}</echo>
<echo file="${javadoc}/stuff2.java">public class stuff2 {}</echo>
<echo file="${javadoc}/stuff.properties">x=4</echo>
<javadoc destdir="${javadoc}" failonerror="true">
<fileset dir="${javadoc}"/>
</javadoc>
</target>

</project>

+ 4
- 3
src/main/org/apache/tools/ant/taskdefs/Javadoc.java View File

@@ -2199,11 +2199,12 @@ public class Javadoc extends Task {
if (rc instanceof FileSet) {
FileSet fs = (FileSet) rc;
if (!fs.hasPatterns() && !fs.hasSelectors()) {
fs = (FileSet) fs.clone();
fs.createInclude().setName("**/*.java");
FileSet fs2 = (FileSet) fs.clone();
fs2.createInclude().setName("**/*.java");
if (includeNoSourcePackages) {
fs.createInclude().setName("**/package.html");
fs2.createInclude().setName("**/package.html");
}
rc = fs2;
}
}
Iterator iter = rc.iterator();


+ 5
- 0
src/tests/junit/org/apache/tools/ant/taskdefs/JavadocTest.java View File

@@ -131,4 +131,9 @@ public class JavadocTest extends BuildFileTest {
public void testDoublyNestedFilesetNoPatterns() throws Exception {
executeTarget("doublyNestedFilesetNoPatterns");
}

public void testNonJavaIncludes() throws Exception { // #41264
executeTarget("nonJavaIncludes");
}

}

Loading…
Cancel
Save