How to exclude files from being copied to bin-debug on build
Asked Answered
E

3

9

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.

Etam answered 11/8, 2009 at 21:10 Comment(0)
D
9

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 Options" 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.

Discussion answered 12/8, 2009 at 18:47 Comment(1)
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.Etam
I
1

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
Interchangeable answered 11/8, 2009 at 21:24 Comment(2)
While there is an equivalent Flex Build Path option, the functions available are different. Not a helpful answer.Chancy
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.Interchangeable
P
0

If you want to exclude specific resources but still include non-embedded files you can add a Resource Filter.

  1. Open the project Properties
  2. Select Resource > Resource Filters
  3. Add a Resource Filter by clicking Add... on the right
  4. Set Filter type to Exclude all
  5. Set Applies to to Files and folders and select All children (recursive)
  6. Specifiy the File and Folder Attributes (i.e.: Name matches ".git")
  7. Click OK and then Apply to save your new Resource Filters.
  8. 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.

Pronominal answered 27/5, 2016 at 19:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.