Package org.apache.maven.bootstrap.util

Examples of org.apache.maven.bootstrap.util.DirectoryScanner


        {
            for ( Iterator it = config.getSourceLocations().iterator(); it.hasNext(); )
            {
                String sourceLocation = (String) it.next();

                DirectoryScanner scanner = new DirectoryScanner();

                scanner.setBasedir( sourceLocation );

                Set includes = config.getIncludes();
                if ( includes != null && !includes.isEmpty() )
                {
                    String[] inclStrs = (String[]) includes.toArray( new String[includes.size()] );
                    scanner.setIncludes( inclStrs );
                }
                else
                {
                    scanner.setIncludes( new String[]{"**/*.java"} );
                }

                Set excludes = config.getExcludes();
                if ( excludes != null && !excludes.isEmpty() )
                {
                    String[] exclStrs = (String[]) excludes.toArray( new String[excludes.size()] );
                    scanner.setIncludes( exclStrs );
                }

                scanner.scan();

                String[] sourceDirectorySources = scanner.getIncludedFiles();

                for ( int j = 0; j < sourceDirectorySources.length; j++ )
                {
                    File f = new File( sourceLocation, sourceDirectorySources[j] );

View Full Code Here

TOP

Related Classes of org.apache.maven.bootstrap.util.DirectoryScanner

Copyright © 2018 www.massapicom. 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.