Using Adobe Flex Builder Pro stand-alone, how do I filter or exclude some files in my project source folder from being copied into the bin-debug folder during a build? Flex Builder is based on the Eclipse platform IDE, this could be as much of a question about Eclipse as it is Flex Builder.
You can prevent Flex from copying all extra files like this:
- Within Flex Navigator panel, right-click on the Flex project
- Choose Properties
- Click on "Flex Compiler" on the left
- Under "Compiler Options" DESELECT "Copy non-embedded files to output folder"
- Click OK
If you want to include some but not others, then you can use a custom Ant build script to do the build and copy the limited files you want to copy.
Eclipse allows you to specify include and exclude patterns on the Java build path. The following describes how to exclude files from the Java path, there may be an equivalent on the Flex Build Path properties page.
Update: This is how it is done in Java, I imagine that the Flex Build Path would implement it in a similar way if at all. As someone has kindly voted me down for saying that it might be done this way it appears that this is not supported in Flex.
- Open the project Properties (right-click->Properties or Alt-Enter)
- Select Java Build Path and the Source tab.
- Expand a source folder and select the Excluded: child item
- Select Edit...
- on the dialog, you can then specify one or more glob patterns to exclude files from the path
If you want to exclude specific resources but still include non-embedded files you can add a Resource Filter.
- Open the project Properties
- Select Resource > Resource Filters
- Add a Resource Filter by clicking Add... on the right
- Set Filter type to Exclude all
- Set Applies to to Files and folders and select All children (recursive)
- Specifiy the File and Folder Attributes (i.e.: Name matches ".git")
- Click OK and then Apply to save your new Resource Filters.
- Clean the project by going to Project > Clean... and clicking OK
This process can also be used to create an "Include Only" resource filter, essentially white-listing instead of black-listing.
© 2022 - 2024 — McMap. All rights reserved.