开发者

Change the Result Text in Ant

开发者 https://www.devze.com 2023-01-04 00:46 出处:网络
Ant finishes by printing: BUILD SUCCESSFUL Total time: x minute y seconds Is there an easy way to c开发者_Go百科ustomize that text?Sometimes I\'m not using Ant to build, but for other batch proces

Ant finishes by printing:

BUILD SUCCESSFUL
Total time: x minute y seconds

Is there an easy way to c开发者_Go百科ustomize that text? Sometimes I'm not using Ant to build, but for other batch processes, and I'd like to avoid seeing BUILD SUCCESSFUL when no build was attempted.


This message is issued by the default BuildLogger ant uses. See this for the list of builtin loggers ant provides.

If you want something special, you can simply run ant with:

ant -logger org.apache.tools.ant.NoBannerLogger

for example, or use your own implementation of the BuildLogger interface. The easiest way is to derive from DefaultLogger, overriding whant you want to change. You can for example implement your own

public void buildFinished(BuildEvent event)

method, if you want customized ending messages.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号