You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Savitha Rajiv <sa...@yahoo.com> on 2005/05/29 07:04:05 UTC

How to send build status in email...

Hi,
 
I need to be able to notify via email, the status of the build. Did it fail or succeed. I know how to email a file, but dont know how to trap the build information into a file. Please help.
 
Here is the maven.xml for emailing file...
 

<project default="send-report"

xmlns:j="jelly:core"

xmlns:u="jelly:util"

xmlns:ant="jelly:ant"

xmlns:maven="jelly:maven">





<goal name="send-report">

<echo>SENDING REPORTS VIA EMAIL</echo>

<mail subject="nightly-build on Mercury finished"

mailhost="mail.wiziotec.com" mailport="25"

encoding="plain">

<from address="build@wiziotec.com" name="Build Info group"/>

<to address="user7@wiziotec.com" name="Savitha Rajiv" /> 

<!-- Right now I have created a dummy log file to send via email -->

<message src="maven-nightly-build.log" />

<fileset dir="c:\wiziotec\workspace\root">

<include name="maven-nightly-build.log" />

</fileset> 

</mail>

</goal>

 

Thanks!



		
---------------------------------
Do You Yahoo!?
 Yahoo! Small Business - Try our new Resources site!

Re: How to send build status in email...

Posted by dan tran <da...@gmail.com>.
You need to wrap your maven works in a shell script:

   1. get the script to call your main goal and redirect both stdout
and stderror
      to a file.

   2 the same script will then invoke the send report goal with the 
     location of the log

-D

On 5/28/05, Savitha Rajiv <sa...@yahoo.com> wrote:
> Hi,
> 
> I need to be able to notify via email, the status of the build. Did it fail or succeed. I know how to email a file, but dont know how to trap the build information into a file. Please help.
> 
> Here is the maven.xml for emailing file...
> 
> 
> <project default="send-report"
> 
> xmlns:j="jelly:core"
> 
> xmlns:u="jelly:util"
> 
> xmlns:ant="jelly:ant"
> 
> xmlns:maven="jelly:maven">
> 
> 
> 
> 
> 
> <goal name="send-report">
> 
> <echo>SENDING REPORTS VIA EMAIL</echo>
> 
> <mail subject="nightly-build on Mercury finished"
> 
> mailhost="mail.wiziotec.com" mailport="25"
> 
> encoding="plain">
> 
> <from address="build@wiziotec.com" name="Build Info group"/>
> 
> <to address="user7@wiziotec.com" name="Savitha Rajiv" />
> 
> <!-- Right now I have created a dummy log file to send via email -->
> 
> <message src="maven-nightly-build.log" />
> 
> <fileset dir="c:\wiziotec\workspace\root">
> 
> <include name="maven-nightly-build.log" />
> 
> </fileset>
> 
> </mail>
> 
> </goal>
> 
> 
> 
> Thanks!
> 
> 
> 
> 
> ---------------------------------
> Do You Yahoo!?
>  Yahoo! Small Business - Try our new Resources site!
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org