如何使用 Java 修改 TFS 中的构建定义?
我使用 Eclipse 和 Team Foundation Server 插件 (2010) 来创建要存储在 TFS 中的 Java 代码。我已使用向导和 ANT build.xml 文件成功创建了构建定义。但是,我想修改构建定义以包含在成功构建时设置构建质量的能力,以便 TFS Deployer 能够获取文件并部署它们。
我找到了许多关于如何从 OOB 生成定义之一创建新生成定义的文章,但它们都依赖于 Visual Studio 生成处理,该处理在“新建生成定义”向导中具有“处理”选项卡。 Java 构建没有“进程”选项卡,它们有一个“项目”选项卡。我还了解到该项目选项卡使用升级模板。
我如何修改我的处理以便我可以设置构建质量?这是否应该在 TFSBuld.proj 文件中通过某种方式修改构建模板来完成,或者甚至可以在 ANT 构建脚本中完成?
I am using Eclipse with the Team Foundation Server plug-in (2010) to create Java code to be stored in TFS. I have successfully created a build definition using the wizard and an ANT build.xml file. However, I would like to modify the build definition to include the ability to set the build quality on successful build so that TFS Deployer will pick up the files and deploy them.
I have found a number of articles on how to create a new build definition from one of the OOB ones, but they all rely on the Visual Studio build processing which has a "process" tab in the New Build Definition wizard. Java builds do not have the "process" tab, they have a "project" tab. I also understand that this project tab uses the upgrade template.
How would I modify my processing so that I can set the build quality? Should this be done in the TFSBuld.proj file, by somehow modifying the build template, or maybe even in the ANT build script?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
恐怕您无法从 Eclipse 修改构建定义使用的 XAML 流程。但是,如果您想在流程模板 XAML 中设置构建质量,则可以从 Visual Studio 修改构建定义以使用修改后的 UpgradeTemplate。
或者,您可以修改与构建关联的 TFSBuild.proj 文件,并通过添加与此类似的目标来设置构建质量:
I'm afraid that you cannot modify the XAML process that the build definition uses from Eclipse. However - you could modify the build definition from Visual Studio to use a modified UpgradeTemplate if you wanted to set the build quality in the process template XAML.
Alternatively, you could modify the TFSBuild.proj file associated with the build and get it to set the build quality by adding a target similar to this: