ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgl...@apache.org
Subject svn commit: r491150 - in /ant/core/trunk: WHATSNEW src/etc/testcases/taskdefs/javadoc/javadoc.xml src/main/org/apache/tools/ant/taskdefs/Javadoc.java src/tests/junit/org/apache/tools/ant/taskdefs/JavadocTest.java
Date Sat, 30 Dec 2006 01:44:11 GMT
Author: jglick
Date: Fri Dec 29 17:44:10 2006
New Revision: 491150

URL: http://svn.apache.org/viewvc?view=rev&rev=491150
Log:
#41264: In Ant 1.7.0, <fileset> in <javadoc> does not by default include
only **/*.java as the documentation claims and earlier revisions did.

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/etc/testcases/taskdefs/javadoc/javadoc.xml
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/JavadocTest.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diff&rev=491150&r1=491149&r2=491150
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Fri Dec 29 17:44:10 2006
@@ -6,6 +6,11 @@
 
 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.
   

Modified: ant/core/trunk/src/etc/testcases/taskdefs/javadoc/javadoc.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/etc/testcases/taskdefs/javadoc/javadoc.xml?view=diff&rev=491150&r1=491149&r2=491150
==============================================================================
--- ant/core/trunk/src/etc/testcases/taskdefs/javadoc/javadoc.xml (original)
+++ ant/core/trunk/src/etc/testcases/taskdefs/javadoc/javadoc.xml Fri Dec 29 17:44:10 2006
@@ -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>

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java?view=diff&rev=491150&r1=491149&r2=491150
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java Fri Dec 29 17:44:10
2006
@@ -2199,11 +2199,12 @@
             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();

Modified: ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/JavadocTest.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/JavadocTest.java?view=diff&rev=491150&r1=491149&r2=491150
==============================================================================
--- ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/JavadocTest.java (original)
+++ ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/JavadocTest.java Fri Dec
29 17:44:10 2006
@@ -131,4 +131,9 @@
     public void testDoublyNestedFilesetNoPatterns() throws Exception {
         executeTarget("doublyNestedFilesetNoPatterns");
     }
+
+    public void testNonJavaIncludes() throws Exception { // #41264
+        executeTarget("nonJavaIncludes");
+    }
+
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message