如何在构建时排除文件被复制到 bin-debug

发布于 2024-08-01 18:38:23 字数 157 浏览 2 评论 0原文

使用 Adob​​e Flex Builder Pro 独立版,如何在构建过程中过滤或排除项目源文件夹中的某些文件被复制到 bin-debug 文件夹中? Flex Builder 基于 Eclipse 平台 IDE,这既是关于 Eclipse 的问题,也是关于 Flex Builder 的问题。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

笑梦风尘 2024-08-08 18:38:24

Eclipse 允许您在 Java 构建路径上指定包含和排除模式。 下面描述了如何从 Java 路径中排除文件,Flex 构建路径属性页面上可能有等效的内容。

更新:这就是 Java 中的实现方式,我想 Flex Build Path 会以类似的方式实现它(如果有的话)。 由于有人善意地投票否决了我所说的可以通过这种方式完成的事情,看来 Flex 中不支持这种方式。

  1. 打开项目属性(右键单击->属性Alt-Enter
  2. 选择Java构建路径强>选项卡。
  3. 展开源文件夹并选择排除:子项
  4. 选择编辑... ,然后您可以指定一个或多个全局模式以从路径中排除文件
  5. 在对话框中

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
拿命拼未来 2024-08-08 18:38:24

如果您想排除特定资源但仍包含非嵌入文件,您可以添加资源过滤器。

  1. 打开项目属性
  2. 选择资源> 资源过滤器
  3. 通过单击右侧的添加... 添加资源过滤器 将
  4. 过滤器类型设置为全部排除
  5. 设置应用于文件和文件夹,然后选择所有子级(递归)
  6. 指定文件和文件夹属性(即:名称与“.git”匹配)
  7. 点击确定,然后点击应用保存新的资源过滤器。
  8. 转到项目 > 清理项目 清理...并单击确定

此过程还可用于创建“仅包含”资源过滤器,本质上是白名单而不是黑名单。

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.

清晨说晚安 2024-08-08 18:38:23

您可以阻止 Flex 复制所有额外文件,如下所示:

  1. 在 Flex Navigator 面板中,右键单击 Flex 项目
  2. 选择属性
  3. 单击左侧的“Flex 编译器”
  4. 在“编译器选项”下取消选择“将非嵌入文件复制到输出文件夹” “
  5. 单击

确定”如果您想包含一些但不包含其他文件,那么您可以使用自定义 Ant 构建脚本来进行构建并复制您想要复制的有限文件。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文