【问题标题】:Populating Team Build summary with errors / warning from an ant build使用来自 ant build 的错误/警告填充 Team Build 摘要
【发布时间】:2011-06-07 11:23:55
【问题描述】:

我正在使用 TFS 2008 和团队构建来使用 ant 和 Microsoft Team Foundation Server 2010 Build Extensions 编译一些 Java 代码。我的经验是使用 Microsoft 堆栈,而 ant 对我来说有点陌生,我们有一个承包商,他对 Java / ant 世界了如指掌,但他以前从未使用过 TFS。

我创建了一个调用 ant build.xml 文件的 TFSbuild.proj。构建运行并编译代码,输出被复制到放置位置,所以这一切都很好。但是,当我检查构建日志时,我可以看到来自 Java 编译器的大量警告,但构建摘要显示 0 个错误,0 个警告。

我们的编码标准规定应解决所有编译器和静态代码分析警告,构建摘要是让开发人员知道他们需要查看代码的好方法。有没有办法让 ant 将错误/警告返回给团队构建,以便它可以用警告填充构建摘要?以下是我可以在日志中看到的一些警告示例。

[buildObjects] E:\Build\Sources\Project\custom\WEB-INF\config\Configuration\Audit Configuration.xml: warning: You are overring an object imported by init.xml with the same 'Audit Configuration' but with a different ID '#ID#Configuration:AuditConfiguration'.

[buildObjects] E:\Build\Sources\Project\custom\WEB-INF\config\AdminGroup\Manager Operations.xml: warning: It is a recommended best practice that the object 'Manage Operations' specify an ID '#ID#AdminGroup:Manage Operations'.

[buildObjects] E:\Build\Project\custom\WEB-INF\config\AdminRole\AdminRole-operations.xml: warning: ObjectRef to object 'IS Admin' cannot be resolved in the current project.

[buildObjects] E:\Build\Project\custom\WEB-INF\config\Configuration\SubProcess-addAccessManager.xml:153: warning: Unresolved reference to variable 'user'. Variable is assumed to be a task input variable.

【问题讨论】:

    标签: java ant tfs tfsbuild


    【解决方案1】:

    我认为 Build Extensions 电动工具应该已经解析出错误和警告并将它们放入您的构建日志中。您可以给我写一封邮件 (martinwo@microsoft.com) 与您的 ant 日志输出,我会尝试看看?一旦我们弄清楚了,我会再次编辑这个答案。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-17
      • 1970-01-01
      • 1970-01-01
      • 2017-08-30
      • 2014-06-03
      相关资源
      最近更新 更多