Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@jakarta.apache.org Received: (qmail 35660 invoked by uid 500); 7 Jun 2001 16:07:55 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: ant-user@jakarta.apache.org Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 35449 invoked from network); 7 Jun 2001 16:07:31 -0000 Message-ID: <13EFBBC3DB08D511A5CB0002A5095C5215F947@mail.workscapeexpress.com> From: "O'Hara, Patrick" To: "'ant-user@jakarta.apache.org'" Subject: RE: How do I get the log file name? Date: Thu, 7 Jun 2001 12:07:04 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C0EF6B.E4D53110" X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C0EF6B.E4D53110 Content-Type: text/plain; charset="iso-8859-1" I was hoping to use the mail task in Ant. In Ant I know that the build was successful, and I must know what the log file name is somewhere. Is it in a property? What is the name? I have everything else to use the mail task except the log file name. Patrick O'Hara 262-408-3849 patrick.ohara@workscape.com -----Original Message----- From: Steve Donie [mailto:sdonie@zycor.lgc.com] Sent: Thursday, June 07, 2001 10:02 AM To: 'ant-user@jakarta.apache.org' Subject: RE: How do I get the log file name? 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. -----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" To: "Ant User Mailing List (E-mail)" 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 > <> > ------_=_NextPart_001_01C0EF6B.E4D53110 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: How do I get the log file name?

I was hoping to use the mail task in Ant.  In = Ant I know that the build was successful, and I must know what the log = file name is somewhere.  Is it in a property?  What is the = name?  I have everything else to use the mail task except the log = file name.

Patrick O'Hara
262-408-3849
patrick.ohara@workscape.com




-----Original Message-----
From: Steve Donie [mailto:sdonie@zycor.lgc.com]
Sent: Thursday, June 07, 2001 10:02 AM
To: 'ant-user@jakarta.apache.org'
Subject: RE: How do I get the log file name?


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=3DSuccess = -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=3DFailed = -buildfile
%DS_HOME%\tools\build.xml SendMail&goto = BUILD_DONE

:BUILD_DONE
.
.
.


DO_DS_LOG is set to -logfile=3Dbuild.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.

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






-----Original Message-----
From: Erik Hatcher [mailto:erikhatcher@earthlink.n= et]
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>>
>

------_=_NextPart_001_01C0EF6B.E4D53110--