Search code examples
maven-2maven-3maven-install-plugin

Custom message when mvn install completes?


I'd like to display a string of characters on the console when mvn install completes (ie something the user is likely to see).

Is there a simple way to do that?


Solution

  • For that pupose just try the maven-echo-plugin bound to the correct lifecycle phase:

    <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>