views:

988

answers:

2

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.

A: 

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.

  1. Open the project Properties (right-click->Properties or Alt-Enter)
  2. Select Java Build Path and the Source tab.
  3. Expand a source folder and select the Excluded: child item
  4. Select Edit...
  5. on the dialog, you can then specify one or more glob patterns to exclude files from the path
Rich Seller
While there is an equivalent Flex Build Path option, the functions available are different. Not a helpful answer.
bug-a-lot
I did say there *may* be an equivalent not that there was. I don't do Flex development so am not in a position to confirm, and the documentation is vague on the subject If it were implemented it would likely be done in a similar manner.
Rich Seller
+4  A: 

You can prevent Flex from copying all extra files like this:

  1. Within Flex Navigator panel, right-click on the Flex project
  2. Choose Properties
  3. Click on "Flex Compiler" on the left
  4. Under "Compiler Optiosn" DESELECT "Copy non-embedded files to output folder"
  5. 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.

Sam
I settled on using Ant build scripts because the current version of Flex Builder 3 stand-alone doesn't have the Eclipse features that Rich Seller (below) described. I suppose an option is to use Eclipse with the FB3 plugin, but Apache Ant has proven itself for my needs. Thanks for the advice.
Michael Prescott