使用 ant 构建项目时,你们都运行哪些自定义目标?

发布于 2024-07-08 02:22:46 字数 133 浏览 4 评论 0原文

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

您有何看法?

I am thinking of running this custom targets to find out more about my project build status
- jalopy
- jdepend
- cvs tagdiff report
- custom task for NoUnit
- generate UML diagram. ESS-Model

What are your views?

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

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

发布评论

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

评论(3

硪扪都還晓 2024-07-15 02:22:46

我认为这是一个好主意并且我自己也使用它。 这样我就永远不会忘记运行它。

我还将报告保留相当长的时间,并最终创建一个“进度”电子表格。

在您的主要蚂蚁任务中 - 调用另一个任务来执行“任何操作”


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>

神奇构建机器

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

盗心人 2024-07-15 02:22:46

我支持“好主意”部分,尽管对于合理规模的项目,您可能希望将其作为自动构建的一部分,例如 CI 服务器之一(Bamboo、Contiuum)。

您还可以考虑使用代码覆盖率工具来查看测试覆盖率的进展情况。

这将确保报告定期运行,可以为您提供发布它们的地方,并且不会减慢开发人员的快速周转开发周期。

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.

所谓喜欢 2024-07-15 02:22:46

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

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

I also think some reports about your project are a good idea. My template-project for an ant-build-script (Antiplate) has at the moment the following reports: Junitreport, emma-report, PMD, CPD and Checkstyle. I'm thinking about including a JDepend-report.

At work we use these templates and using Hudson as continuous-integration-system. Hudson creates wonderful graphs for these reports and how the measures changed with the builds.

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