java - How to display custom message on Maven build failure -


when run clean maven profile build ("mvn clean install -pmyprofile"), want ability present custom, static text message user if build fails.

for example, this:

[info] ------------------------------------------------------------------------ [info] build failure [info] ------------------------------------------------------------------------ [info] total time: 2:54.666s [info] finished at: mon may 13 10:44:48 mdt 2013 [info] final memory: 27m/81m [info] ------------------------------------------------------------------------ 

to this:

[info] ------------------------------------------------------------------------ [info] build failure [info] ------------------------------------------------------------------------ [info] total time: 2:54.666s [info] finished at: mon may 13 10:44:48 mdt 2013 [info] final memory: 27m/81m [info] ------------------------------------------------------------------------ [info] [info] troubleshooting steps build, go http://www.somewhere.com [info] [info] if continue have trouble, email guy @ some_guy@somewhere.com [info] 

is possible in maven?

use component handles mojofailureexception:

@component private mojoexecution execution;  public void execute() throws mojoexecutionexception, mojofailureexception    {   (artifact artifact : (collection<artifact>) execution.getmojodescriptor().getplugindescriptor().getartifacts())      {     getlog().info("artifact: " + artifact);     }   } 

references


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -