maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r793908 - in /maven/plugins/trunk/maven-javadoc-plugin/src: main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java test/java/org/apache/maven/plugin/javadoc/JavadocUtilTest.java
Date Tue, 14 Jul 2009 14:14:46 GMT
Author: vsiveton
Date: Tue Jul 14 14:14:46 2009
New Revision: 793908

URL: http://svn.apache.org/viewvc?rev=793908&view=rev
Log:
MJAVADOC-232: copied doc-files folder contains svn meta files

o improve test

Modified:
    maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java
    maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocUtilTest.java

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java?rev=793908&r1=793907&r2=793908&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java
(original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java
Tue Jul 14 14:14:46 2009
@@ -314,7 +314,7 @@
             while ( st.hasMoreTokens() )
             {
                 current = st.nextToken();
-                excludes.add( "**/" + current + "/*" );
+                excludes.add( "**/" + current + "/**" );
             }
         }
 
@@ -331,10 +331,12 @@
                 FileUtils.mkdir( docFileOutput.getAbsolutePath() );
                 FileUtils.copyDirectoryStructure( new File( javadocDir, docFile ), docFileOutput
);
                 List files =
-                    FileUtils.getFiles( docFileOutput, StringUtils.join( excludes.iterator(),
"," ), null, true );
+                    FileUtils.getFileAndDirectoryNames( docFileOutput,
+                                                        StringUtils.join( excludes.iterator(),
"," ), null, true,
+                                                        true, true, true );
                 for ( Iterator it2 = files.iterator(); it2.hasNext(); )
                 {
-                    File file = (File) it2.next();
+                    File file = new File( it2.next().toString() );
 
                     if ( file.isDirectory() )
                     {

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocUtilTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocUtilTest.java?rev=793908&r1=793907&r2=793908&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocUtilTest.java
(original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocUtilTest.java
Tue Jul 14 14:14:46 2009
@@ -350,8 +350,17 @@
             + "sample-included1.gif" );
         expected.add( "test" + File.separator + "doc-files" + File.separator + "included-dir2"
+ File.separator
             + "sample-included2.gif" );
-
         assertTrue( EqualsBuilder.reflectionEquals( expected, FileUtils.getFiles( output,
null, null, false ) ) );
+        expected = new ArrayList();
+        expected.add( "" );
+        expected.add( "test" + File.separator + "doc-files" + File.separator + "excluded-dir1"
);
+        expected.add( "test" + File.separator + "doc-files" + File.separator + "excluded-dir1"
);
+        expected.add( "test" + File.separator + "doc-files" + File.separator + "included-dir1"
);
+        expected.add( "test" + File.separator + "doc-files" + File.separator + "included-dir2"
);
+        assertTrue( EqualsBuilder.reflectionEquals( expected,
+                                                    FileUtils.getDirectoryNames( new File(
output,
+                                                                                        
  "test/doc-files" ),
+                                                                                 null, null,
false ) ) );
 
         input = new File( getBasedir(), "src/test/resources/unit/docfiles-test/docfiles/"
);
         assertTrue( input.exists() );
@@ -369,7 +378,14 @@
             + "sample-included1.gif" );
         expected.add( "test" + File.separator + "doc-files" + File.separator + "included-dir2"
+ File.separator
             + "sample-included2.gif" );
-
         assertTrue( EqualsBuilder.reflectionEquals( expected, FileUtils.getFiles( output,
null, null, false ) ) );
+        expected = new ArrayList();
+        expected.add( "" );
+        expected.add( "test" + File.separator + "doc-files" + File.separator + "included-dir1"
);
+        expected.add( "test" + File.separator + "doc-files" + File.separator + "included-dir2"
);
+        assertTrue( EqualsBuilder.reflectionEquals( expected,
+                                                    FileUtils.getDirectoryNames( new File(
output,
+                                                                                        
  "test/doc-files" ),
+                                                                                 null, null,
false ) ) );
     }
 }



Mime
View raw message