Package org.codehaus.plexus.util

Examples of org.codehaus.plexus.util.DirectoryScanner.scan()


                    new String[resource.getExcludes().size()]));
        }

        scanner.addDefaultExcludes();

        scanner.scan();

        return scanner.getIncludedFiles();
    }
}
View Full Code Here


        DirectoryScanner scanner = new DirectoryScanner();
        scanner.setBasedir(base);
        scanner.setIncludes(includes);
        scanner.setExcludes(excludes);
        scanner.scan();

        for (String included : scanner.getIncludedFiles()) {
            pages.add(included);
        }
    }
View Full Code Here

        scanner.addDefaultExcludes();
        if ( includePatterns != null )
        {
            scanner.setIncludes( includePatterns.toArray( new String[includePatterns.size()] ) );
        }
        scanner.scan();
        String[] classFiles = scanner.getIncludedFiles();

        for ( String classFile : classFiles )
        {
            if ( !classFile.endsWith( ".class" ) )
View Full Code Here

            scanner.setIncludes(includes.toArray(new String[includes.size()]));
        }
        if (excludes != null) {
            scanner.setExcludes(excludes.toArray(new String[excludes.size()]));
        }
        scanner.scan();
        return asList(scanner.getIncludedFiles());
    }

    protected List<String> scanJar(String jarPath, List<String> includes, List<String> excludes) {
        return new JarFileScanner(jarPath, includes, excludes).scan();
View Full Code Here

   */
  private String[] scanIncludedFiles() {
    final DirectoryScanner scanner = new DirectoryScanner();
    scanner.setBasedir(sourceDirectory);
    scanner.setIncludes(new String[]{inputFilename});
    scanner.scan();
    return scanner.getIncludedFiles();
  }


  /**
 
View Full Code Here

            scanner.setBasedir( outputDirectory );
            scanner.setIncludes( new String[]
                { "**/*.class" } );

            scanner.addDefaultExcludes();
            scanner.scan();

            String[] paths = scanner.getIncludedFiles();
            for ( int i = 0; i < paths.length; i++ )
            {
                packages.put( analyzer.getPackageRef( getPackageName( paths[i] ) ) );
View Full Code Here

                {
                    scanner.setExcludes( ( String[] ) resource.getExcludes().toArray( EMPTY_STRING_ARRAY ) );
                }

                scanner.addDefaultExcludes();
                scanner.scan();

                List includedFiles = Arrays.asList( scanner.getIncludedFiles() );

                for ( Iterator j = includedFiles.iterator(); j.hasNext(); )
                {
View Full Code Here

        {
            ds.addDefaultExcludes();
        }
        ds.setCaseSensitive( isCaseSensitive() );
        ds.setFollowSymlinks( isFollowingSymLinks() );
        ds.scan();

        Map attributesByPath = PlexusIoResourceAttributeUtils.getFileAttributesByPath( getBaseDir() );
       
        final List result = new ArrayList();
        if ( isIncludingEmptyDirectories() )
View Full Code Here

            if (fileSet.getExcludes() != null && !fileSet.getExcludes().isEmpty())
                //noinspection unchecked
                scanner.setExcludes((String[]) fileSet.getExcludes().toArray(emptyStrArray));

            scanner.addDefaultExcludes();
            scanner.scan();

            List includedFiles = Arrays.asList(scanner.getIncludedFiles());

            log.info("Copying " + includedFiles.size() + " web resource" + (includedFiles.size() > 1 ? "s" : ""));
View Full Code Here

        if (fileSet.getExcludes() != null && !fileSet.getExcludes().isEmpty())
            scanner.setExcludes(finalExcludes);

        scanner.addDefaultExcludes();
        scanner.scan();

        return scanner.getIncludedFiles();
    }

    private void prepareInclusionSet(FileSet fileSet)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.