Package org.codehaus.plexus.util

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


        {
            String[] exclStrs = (String[]) excludes.toArray( new String[excludes.size()] );
            scanner.setIncludes( exclStrs );
        }

        scanner.scan();

        String[] sourceDirectorySources = scanner.getIncludedFiles();

        Set sources = new HashSet();
View Full Code Here


            if (resource.getExcludes() != null && !resource.getExcludes().isEmpty()) {
                scanner.setExcludes((String[])resource.getExcludes().toArray(new String[]{}));
            }

            scanner.addDefaultExcludes();
            scanner.scan();
   
            List<String> includedFiles = Arrays.asList(scanner.getIncludedFiles());
            String targetPath = resource.getTargetPath();
            for (String source: includedFiles) {
                String target;
View Full Code Here

            scanner.setIncludes( (String[]) concatenateToList( fileSet.getIncludes(), fileSet.getDirectory() ).toArray(
                new String[fileSet.getIncludes().size()] ) );
            scanner.setExcludes( (String[]) fileSet.getExcludes().toArray( new String[fileSet.getExcludes().size()] ) );
            scanner.addDefaultExcludes();
            getLogger().debug( "Using fileset " + fileSet );
            scanner.scan();

            List<String> fileSetResources = Arrays.asList( scanner.getIncludedFiles() );
            getLogger().debug( "Scanned " + fileSetResources.size() + " resources" );

            if ( fileSet.isFiltered() )
View Full Code Here

    DirectoryScanner scanner = new DirectoryScanner();
    scanner.setBasedir(sourceDir);
    scanner.setIncludes(new String[]{"**"});
    scanner.setExcludes(new String [] {"META-INF/**/*",
        "**/*.properties", "**/*.xml", "**/*.class"});
    scanner.scan();
    return scanner.getIncludedFiles();
  }
}
View Full Code Here

        DirectoryScanner scanner = new DirectoryScanner();

        scanner.setBasedir( directory );
        scanner.setIncludes( CLASS_INCLUDES );

        scanner.scan();

        String[] paths = scanner.getIncludedFiles();

        for ( int i = 0; i < paths.length; i++ )
        {
View Full Code Here

        DirectoryScanner scanner = new DirectoryScanner();

        scanner.setBasedir( directory );
        scanner.setIncludes( CLASS_INCLUDES );

        scanner.scan();

        String[] paths = scanner.getIncludedFiles();

        for ( String path : paths )
        {
View Full Code Here

        if (excludes != null && !excludes.isEmpty()){
          scanner.setExcludes((String[])excludes.toArray(new String[]{}));
        }
       
        scanner.addDefaultExcludes();
        scanner.scan();
       
        List<String> includedFiles = Arrays.asList( scanner.getIncludedFiles() );
        getLog().info("   " + resource.getDirectory());
        for (String name: includedFiles){
          File fromPath=new File(sourcePath,name);
View Full Code Here

        scanner.setBasedir( sourceDir );
        if ( !cloneAllFiles )
        {
            scanner.addDefaultExcludes();
        }
        scanner.scan();

        /*
         * NOTE: Make sure the destination directory is always there (even if empty) to support POM-less ITs.
         */
        destDir.mkdirs();
View Full Code Here

        if ( excludes != null )
        {
            scanner.setExcludes( excludes.toArray( new String[excludes.size()] ) );
        }
        scanner.addDefaultExcludes();
        scanner.scan();

        Map<String, BuildJob> matches = new LinkedHashMap<String, BuildJob>();

        for ( String includedFile : scanner.getIncludedFiles() )
        {
View Full Code Here

        scanner.setBasedir( sourceDir );
        if ( !cloneAllFiles )
        {
            scanner.addDefaultExcludes();
        }
        scanner.scan();

        /*
         * NOTE: Make sure the destination directory is always there (even if empty) to support POM-less ITs.
         */
        destDir.mkdirs();
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.