protected static Set < String > resolveIncludeExcludeString ( String input , File basedir ) throws MojoExecutionException { Set < String > inclExlSet = new LinkedHashSet < String > ( ) ; try { if ( null == input || input . trim ( ) . equals ( "" ) ) { return inclExlSet ; } String [ ] elements = input . split ( "," ) ; if ( null != elements ) { for ( int i = 0 ; i < elements . length ; i ++ ) { String element = elements [ i ] ; if ( element . endsWith ( ".java" ) || element . endsWith ( ".aj" ) ) { inclExlSet . addAll ( FileUtils . getFileNames ( basedir , element , "" , true ) ) ; } else { File lookupBaseDir = new File ( basedir , element ) ; if ( FileUtils . fileExists ( lookupBaseDir . getAbsolutePath ( ) ) ) { inclExlSet . addAll ( FileUtils . getFileNames ( lookupBaseDir , DEFAULT_INCLUDES , "" , true ) ) ; } } } } } catch ( IOException e ) { throw new MojoExecutionException ( "Could not resolve java or aspect sources to compile" , e ) ; } return inclExlSet ; }
Helper method to find all . java or . aj files specified by the includeString . The includeString is a comma separated list over files or directories relative to the specified basedir . Examples of correct listings