ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Donie <sdo...@zycor.lgc.com>
Subject RE: How do I get the log file name?
Date Thu, 07 Jun 2001 15:02:24 GMT
You can also do this, which doesn't require a logger. I have a build.bat
(Win2K) that calls Ant:

.
.
.
call ant.bat -emacs -buildfile %DS_HOME%\tools\build.xml %DO_DS_LOG%
%*||goto FAILED

:SUCCEEDED
echo Build.bat success
if not defined DO_DS_LOG goto BUILD_DONE
echo Build.bat sending mail 
call ant.bat -emacs -DBuildResult=Success -buildfile
%DS_HOME%\tools\build.xml SendMail&goto BUILD_DONE

:FAILED
echo Build.bat fail
if not defined DO_DS_LOG goto BUILD_DONE
echo Build.bat sending mail 
call ant.bat -emacs -DBuildResult=Failed -buildfile
%DS_HOME%\tools\build.xml SendMail&goto BUILD_DONE

:BUILD_DONE
.
.
.


DO_DS_LOG is set to -logfile=build.log for the nightly build machine, and
not set on developers machines. The ||goto FAILED at the end of the call to
ant.bat will go to the FAILED label if the build fails, or fall through to
SUCCEEDED. In my build.xml, I have a target SendMail that looks vaguely like
this. I actually create a smaller summary of the build called BuildMail.log
using the echo task, but you could also just mail out build.log.

  <!--
       ===================================================================
                              Send mail out with results
       ===================================================================
       note that ${BuildResult} and the do-mail property must have been set!
  -->
  <target name="SendMail" if="do-mail" description="Sends mail with build
results if do-mail proerty is set. Used by automatic build.">    
	<mail from="TahoeBuild@lgc.com" 
          tolist="${MailtoList}" 
          subject="Results of Tahoe nightly build ${label} (${BuildResult})"
          files="BuildMail.log" 
          mailhost="mailhost" />
  </target>






-----Original Message-----
From: Erik Hatcher [mailto:erikhatcher@earthlink.net]
Sent: Thursday, June 07, 2001 9:00 AM
To: ant-user@jakarta.apache.org
Subject: Re: How do I get the log file name?


http://jakarta.apache.org/ant/faq.html#mail-logger


----- Original Message -----
From: "O'Hara, Patrick" <patrick.ohara@workscape.com>
To: "Ant User Mailing List (E-mail)" <ant-user@jakarta.apache.org>
Sent: Thursday, June 07, 2001 6:48 AM
Subject: How do I get the log file name?


> I want my build to mail the log file to a list of people.  I have looked
at
> the mail command and I am wondering how I get the file name of the log
file?
>
> Patrick O'Hara
> Workscape, Inc
> N17 W24222 Riverwood Pl
> Waukesha, WI 53188-1162
> 262-408-3849
> 262-408-3840 Fax
> patrick.ohara@workscape.com
>  <<O'Hara, Patrick.vcf>>
>

Mime
View raw message