代码之家  ›  专栏  ›  技术社区  ›  RichH

什么是好的Ant目标命名约定?

  •  10
  • RichH  · 技术社区  · 15 年前

    你总是在脚本中添加什么任务?比如清洁,建造?

    如何命名通过依赖关系构成单个目标的目标(或者不这样做)?例如build.proj1和build.proj2

    2 回复  |  直到 15 年前
        1
  •  7
  •   JoseK    15 年前

    This link 说明项目中应该具有的典型目标。

    从个人经验来看,我得说 clean, build, deploy/install, test (测试运行junits、findbugs等)

    <target name="build" depends="clean,compile">
    
    <target name="compile" depends="compile.src, compile.test">
    
        2
  •  10
  •   Rebse    10 年前

    目标名称,即。 <target name="-yourprivatetarget" ... /> . ant -f yourbuild.xml -yourprivatetarget 不起作用
    <target name="yourprivatetarget" ... /> ant -f yourbuild.xml yourprivatetarget 会的。

    ant-projecthelp(或ant-p)。 或者类似的方法将在其ant编辑器的Outline视图中公开所有目标。