Hi Benjamin, Thanks for review. Changing the method in p-u to FileUtils.copyDirectoryLayout( source, target, directoryScanner ) ? Assuming scan() method already called in the directoryScanner instance. -- Olivier
2008/9/17 Benjamin Bentmann <[EMAIL PROTECTED]>: >> Author: olamy >> Date: Tue Sep 16 13:55:35 2008 >> New Revision: 696052 >> >> URL: http://svn.apache.org/viewvc?rev=696052&view=rev >> Log: >> use new method copyDirectoryLayout from FileUtils >> >> Modified: >> >> >> maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFiltering.java >> >> Modified: >> maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFiltering.java >> URL: >> http://svn.apache.org/viewvc/maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFiltering.java?rev=696052&r1=696051&r2=696052&view=diff >> >> ============================================================================== >> --- >> maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFiltering.java >> (original) >> +++ >> maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFiltering.java >> Tue Sep 16 13:55:35 2008 >> @@ -246,7 +246,7 @@ >> { >> try >> { >> - FileUtils.copyDirectoryStructure( resourceDirectory, >> targetPath == null ? outputDirectory >> + FileUtils.copyDirectoryLayout( resourceDirectory, >> targetPath == null ? outputDirectory >> >> : new File( outputDirectory, >> >> targetPath ), >> includes, excludes >> ); > > Hm, do we really need to do another scan here? The DirectoryScanner is > already hanging around and scanner.getIncludedDirectories() knows the > directories to copy, doesn't it? > > I am basically concerned about performance here: IO is expensive and > scanning a big directory twice when the results are the same doesn't look > right IMHO. Not to mention the increased memory consumption since two > populated DirectoryScanners will be hanging around when the code dives into > copyDirectoryLayout(). > > > Benjamin > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]