如何在没有Antrun插件的情况下在Maven中回显? [英] How to echo in Maven without Antrun plugin?
问题描述
如何在执行mvn命令时(在阶段/目标中)但不使用Maven Antrun插件打印到控制台?
How can I print to the console while executing a mvn command (in a phase/goal), but not using Maven Antrun plugin?
为什么我拒绝Antrun解决方案:
Why I reject Antrun solutions:
- 打印单个消息的代码开销很大.
- 输出没有像maven输出那样格式化
- 我无法在邮件中附加严重性(例如DEBUG,INFO,ERROR等)
目前,蚂蚁回声看起来像这样(请参见"hello world"行):
Currently an Ant-echo looks like this (see line with "hello world"):
[INFO] --- maven-antrun-plugin:1.7:run (default) @ ejpd-alertmanager-ear ---
[WARNING] Parameter tasks is deprecated, use target instead
[INFO] Executing tasks
main:
[echo] hello world
[INFO] Executed tasks
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
但是,我希望它看起来像这样(请参见"hello world"行).
However, I expect it to look like this (see line with "hello world").
[INFO] --- maven-antrun-plugin:1.7:run (default) @ ejpd-alertmanager-ear ---
[WARNING] Parameter tasks is deprecated, use target instead
[INFO] Executing tasks
[INFO] hello world
[INFO] Executed tasks
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
我很肯定,在这里我遗漏了一些东西,因为我不能成为第一个提出这一要求的人.谢谢您的任何巧妙提示.
I'm positive, I am missing something here, since I cannot be the first to raise this demand. Thank you for any smart hint.
推荐答案
我自己没有尝试过,但是这里有一个插件可能会有所帮助:
I haven't tried this myself but there is a plugin here which may help:
http://code.google.com/p/maven-echo-plugin /
这篇关于如何在没有Antrun插件的情况下在Maven中回显?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!