命名蚂蚁目标的最佳做法是什么? [英] What are the best practices for naming ant targets?

查看:37
本文介绍了命名蚂蚁目标的最佳做法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

命名蚂蚁目标的最佳做法是什么?

What are the best practices for naming ant targets?

例如,您希望目标测试"运行什么?所有单元测试?所有功能测试?两个?

For example, what would you expect the target "test" to run? All unit tests? All functional tests? Both?

用于运行不同类型测试(单元/功能/全部)的标准名称是什么?在 J2SE 中部署软件的目标名称是否有标准?在 J2EE 中?

What are the standard names used for running different types of tests (unit/functional/all)? Are there standards for target names to deploy software in J2SE? in J2EE?

我的项目将 ant 用于带有 junit、Swing 应用程序和 J2EE 应用程序的 java 项目.

My project uses ant for a java project with junit, Swing applications, and J2EE applications.

推荐答案

参见 "命名约定"部分在此页面上:Ant Style 的元素

以下目标是许多构建的共同目标.永远避免改变众所周知的目标名称的行为.你不需要实施所有这些都在一个项目中.

The following targets are common to many builds. Always avoid changing the behavior of a well-known target name. You do not need to implement all of these in a single project.

all               Build and test everything; create a distribution, optionally install. 
clean             Delete all generated files and directories. 
deploy            Deploy the code, usually to a remote server. 
dist              Produce the distributables. 
distclean         Clean up the distribution files only. 
docs              Generate all documentation. 
init              Initialize the build: create directories, call <tstamp> and other common actions. 
install           Perform a local installation. 
javadocs          Generate the Javadoc pages. 
printerdocs       Generate printable documents. 
test              Run the unit tests. 
uninstall         Remove a local installation. 

此页面还提供了其他很好的指南.

This page also provides other good guidelines.

这篇关于命名蚂蚁目标的最佳做法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆