Permalink
Browse files

FLEXMOJOS-395 - Simplified fix

  • Loading branch information...
velo committed Aug 30, 2011
1 parent e7e10b9 commit 164b3b30a6d4efb27d74e95ab692d8b5c6418ab4
@@ -19,6 +19,7 @@
import static org.sonatype.flexmojos.plugin.common.FlexScopes.MERGED;
import static org.sonatype.flexmojos.plugin.common.FlexScopes.RSL;
import static org.sonatype.flexmojos.plugin.common.FlexScopes.TEST;
+import static org.sonatype.flexmojos.util.PathUtil.existingFiles;
import static org.sonatype.flexmojos.util.PathUtil.file;
import static org.sonatype.flexmojos.util.PathUtil.files;
@@ -389,15 +390,7 @@ private FlexClassScanner getFlexClassScanner()
{
if ( this.scanner == null )
{
- Set<File> files = new LinkedHashSet<File>();
- files.addAll( Arrays.asList( getSourcePath() ) );
- //remove any reference to a locale source path from being scanned for the purpose of building the tester swf
- for (File file : files) {
- if(file.getPath().contains("{locale}")){
- files.remove(file);
- }
- }
- File[] sp = files.toArray( new File[0] );
+ File[] sp = existingFiles( getSourcePath() );
scanner = scanners.get( coverageStrategy );
if ( scanner == null )
@@ -614,6 +607,14 @@ protected File getSourceFile()
files.addAll( PathUtil.existingFilesList( testCompileSourceRoots ) );
files.addAll( Arrays.asList( super.getSourcePath() ) );
+ if ( getLocale() != null )
+ {
+ if ( localesSourcePath.getParentFile().exists() )
+ {
+ files.add( localesSourcePath );
+ }
+ }
+
return files.toArray( new File[0] );
}

0 comments on commit 164b3b3

Please sign in to comment.