protected String[] scanFiles(String... patterns) {
        String buildOutputDir = project.getBuild().getDirectory();
        if (buildOutputDir != null && new File(buildOutputDir).exists()) {
            DirectoryScanner directoryScanner = new DirectoryScanner();
            directoryScanner.setBasedir(buildOutputDir);
            directoryScanner.setIncludes(patterns);
            directoryScanner.scan();
            return directoryScanner.getIncludedFiles();
        } else {
            return new String[0];
        }

    }
protected String[] scanFiles(String... patterns) {
        String buildOutputDir = project.getBuild().getDirectory();
        if (buildOutputDir != null && new File(buildOutputDir).exists()) {
            DirectoryScanner directoryScanner = new DirectoryScanner();
            directoryScanner.setBasedir(buildOutputDir);
            directoryScanner.setIncludes(patterns);
            directoryScanner.scan();
            return directoryScanner.getIncludedFiles();
        } else {
            return new String[0];
        }

    }
protected String [ ] scanFiles ( String ... patterns ) { String buildOutputDir = project . getBuild ( ) . getDirectory ( ) ; if ( buildOutputDir != null && new File ( buildOutputDir ) . exists ( ) ) { DirectoryScanner directoryScanner = new DirectoryScanner ( ) ; directoryScanner . setBasedir ( buildOutputDir ) ; directoryScanner . setIncludes ( patterns ) ; directoryScanner . scan ( ) ; return directoryScanner . getIncludedFiles ( ) ; } else { return new String [ 0 ] ; } }
Scan the project's output directory for certain files.

@param patterns one or more patterns which fit to Maven's include syntax
@return list of files found
Scan the project s output directory for certain files .