0

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

有没有一种简单的方法可以做到这一点?

4

1 回答 1

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>
于 2012-09-03T12:37:36.213 回答