private ResourceAccessor createResourceAccessor ( ClassLoader classLoader ) { List < ResourceAccessor > resourceAccessors = new ArrayList < ResourceAccessor > ( ) ; resourceAccessors . add ( new FileSystemResourceAccessor ( Paths . get ( "." ) . toAbsolutePath ( ) . getRoot ( ) . toFile ( ) ) ) ; resourceAccessors . add ( new ClassLoaderResourceAccessor ( classLoader ) ) ; String changeLogDirectory = getChangeLogDirectory ( ) ; if ( changeLogDirectory != null ) { changeLogDirectory = changeLogDirectory . trim ( ) . replace ( ' ' , ' ' ) ; //convert to standard / if using absolute path on windows resourceAccessors . add ( new FileSystemResourceAccessor ( new File ( changeLogDirectory ) ) ) ; } return new CompositeResourceAccessor ( resourceAccessors . toArray ( new ResourceAccessor [ 0 ] ) ) ; }
Creates a suitable ResourceAccessor for use in an Ant task ..