2

我正在考虑运行此自定义目标以了解有关我的项目构建状态的更多信息 - jalopy - jdepend - cvs tagdiff 报告 - NoUnit 的自定义任务 - 生成 UML 图。ESS模型

你有什么看法?

4

3 回答 3

1

I think that it's a great idea and use it myself. That way I'll never forget to run it.

I also keep the reports for a decent amount of time and eventually create a spreadsheet of "progress".

In your main ant task - call another task to do "whatever"

and JDepend.xml ...

<target name="statsAll">
    <!-- master file that describes where everything is -->
    <property file="./ant/ant-global.properties" prefix="ant-global" />
    <tstamp>
          <format property="gen.time" pattern="yyyyMMdd_hh"/>
    </tstamp>
    <echo message="LOG:./ant/logs/jdepend.${version.FILETAG}.${gen.time}.rpt"/>
    <!-- generate stats to see if we're improving -->
    <jdepend 
        outputfile="./ant/logs/jdepend.${version.FILETAG}.${gen.time}.rpt" >
  <exclude name="java.*"/>
  <exclude name="javax.*"/>
    <classespath>
    <pathelement location="./jar" />
      </classespath>
      <classpath location="./jar" />
    </jdepend>
</target>

<target name="doJDepend" depends="getVersion,statsAll">
    <echo message="FTP'ing report"/>
    <ftp verbose="yes" passive="yes" depends="yes"
        remotedir="/videojet/metrics" server="xxxxx"
        userid="xxxx" password="xxxxx"
        binary="no"
        systemTypeKey="UNIX">
        <fileset dir="./ant/logs/" casesensitive="no">
          <include name="**/jdepend.${version.FILETAG}*.rpt"/>
          <exclude name="**/*.txt"/>
        </fileset>
    </ftp>
</target>

Magic build machine

于 2008-10-27T17:18:53.457 回答
0

I second the 'good idea' part, although for a project of reasonable size you might want to make it part of an automated build, like one of the CI Servers (Bamboo, Contiuum).

You might also consider a code coverage tool to see how your test coverage is going.

This will ensure the reports get run on a regular basis, could give you somewhere to publish them and won't slow down the developer's quick turnaround development cycle.

于 2008-10-27T18:23:14.670 回答
0

我也认为一些关于你的项目的报告是个好主意。我的 ant-build-script ( Antiplate ) 模板项目目前有以下报告:Junitreport、emma-report、PMD、CPD 和 Checkstyle。我正在考虑包括一个 JDepend 报告。

在工作中,我们使用这些模板并将 Hudson 用作连续集成系统。Hudson 为这些报告创建了精美的图表,以及度量如何随着构建而变化。

于 2009-01-28T22:03:42.383 回答