mvn安装完成后的自定义消息?

时间:2012-09-03 10:30:50

标签: maven-2 maven-3 maven-install-plugin

我想在mvn安装完成时在控制台上显示一串字符 (即用户可能会看到的东西)。

有一种简单的方法吗?

1 个答案:

答案 0 :(得分:2)

为此,只需尝试绑定到正确生命周期阶段的maven-echo-plugin

<plugin>
  <groupId>com.soebes.maven.plugins</groupId>
  <artifactId>maven-echo-plugin</artifactId>
  <version>0.1</version>
  <executions>
    <execution>
      <phase>deploy</phase>
      <goals>
        <goal>echo</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <echos>
      <echo>+----------------------------------------------------------+</echo>
      <echo>!   DON'T FORGET TO SUBSCRIBE TO DEVELOPERS MAILING LIST   !</echo>
      <echo>+----------------------------------------------------------+</echo>
    </echos>
  </configuration>
</plugin>