thanks Diane this helped a lot :)


>From: Diane Holt <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: RE: place the output in a log file
>Date: Tue, 12 Jun 2001 13:40:52 -0700 (PDT)
>
>Pinar,
>
>There are several ways to capture output from Ant, and different amounts
>of output will be captured, depending on which is being used. If you use
>the Ant command-line '-logfile' option, you'll get all the output that the
>command produces. For example:
>
>   $ ant -logfile ant.log
>
>will capture everything, from the opening "Buildfile: build.xml" to the
>ending "Total time: <time>".
>
>If you use the "output" attribute of a task, you'll get just the output
>produced by the running of that particular task -- which is why, in your
>example, all you see in the file you specified in the "output" attribute
>of the <ant> task is just the output generated by that task. If you had
>been running an <exec> task and specified a file for the "output"
>attribute there, that file would contain just the output generated by the
><exec>.
>
>You can also use the new <record> task, which can record, for example, the
>output generated for all the tasks within a particular target. In that
>case, you'll get just the output generated by the tasks that are run after
>the recorder is started and before it's turned off.
>
>Hope this helps,
>Diane
>
>--- Pinar Bicioglu <[EMAIL PROTECTED]> wrote:
> >
> >
> > it is working with the following code...
> > <target name="log" depends="main">
> >       <ant antfile="build.xml" dir="." target="main" output="build.log"
> > />
> >   </target>
> >
> > the output I got from the DOS window is like,
> >
> > D:\ap2\javasrc\server>ant log
> > Buildfile: build.xml
> >
> > init:
> >
> > compile-server:
> >      [echo] Compiling using classpath='     .;
> > d:/ap2/lib/thirdparty;
> >   d:/ap2/lib/t
> > hirdparty/httpunit.jar;
> > d:/ap2/lib/thirdparty/jarkarta-regexp-1.2.jar;
> >    d:/ap2/lib/
> > thirdparty/toplink.jar;     d:/ap2/lib/thirdparty/junit.jar;
> > d:/ap2/lib/thirdparty/log
> > 4j.jar;     d:/ap2/lib/thirdparty/struts.jar;
> > d:/ap2/lib/thirdparty/servlet.jar;     d
> > :/ap2/lib/thirdparty/tidy.jar;     d:/ap2/lib/thirdparty/tools.jar;
> > d:/ap2/lib/thirdpa
> > rty/toplinkall.jar;     d:/ap2/lib/thirdparty/toplinksdk.jar;
> > d:/ap2/lib/thirdparty/to
> > plinksdkxerces.jar;     d:/ap2/lib/thirdparty/toplinkx.jar;
> > d:/ap2/lib/thirdparty/xerc
> >
>es.jar;d:\Java\Lib;d:\bin\xutil.ZIP;d:\Java\Lib\SYMCLASS.ZIP;d:\Java\Lib\CLASSES.ZIP;d:\Ja
> >
>va\Lib\COLLECTIONS.ZIP;d:\Java\Lib\ICEBROWSERBEAN.JAR;d:\Java\Lib\xml.JAR;d:\Java\Lib\SYMT
> >
>OOLS.JAR;d:\swing-1.1\SWINGALL.JAR;d:\Bin\Components\SFC.JAR;d:\Bin\Components\SYMBEANS.JA
> >
>R;d:\Java\Lib\DBAW.ZIP;d:\Bin\Components\DBAW_AWT.JAR;d:\Bin\Components\Databind.JAR;d:\Ja
> >
>va\Lib\ERADTOOLS.JAR;d:\Java\Lib\ERADPUBLIC.JAR;d:\Java\Lib\servlet.jar;d:\Java\Lib\webser
> >
>ver.jar;d:\Bin\Components\templates.jar;d:\Java\Lib\javax_ejb.ZIP;d:\Java\Lib\jndi.jar;d:\
> >
>Java\Lib\jts.zip;d:\Bin\Components\vcejbwl.jar;d:\Bin\sb;d:\Bin\sb\classes\sb.jar;.;'
> >     [javac] Compiling 272 source files to D:\ap2\websrc\WEB-INF\classes
> >     [javac] javac: invalid flag: -sourcepath
> >     [javac] use: javac
> > [-g][-O][-debug][-depend][-nowarn][-verbose][-classpath path][-nowr
> > ite][-deprecation][-d dir][-J<runtime flag>] file.java...
> >
> > BUILD FAILED
> >
> > D:\ap2\javasrc\server\build.xml:108: Compile failed, messages should
> > have
> > been provided.
> >
> > Total time: 4 seconds
> >
> > however it is slightly different in build.log file...it is as the
> > following
> >
> > init:
> >
> > compile-server:
> >      [echo] Compiling using classpath='     .;
> > d:/ap2/lib/thirdparty;
> >   d:/ap2/lib/thirdparty/httpunit.jar;
> > d:/ap2/lib/thirdparty/jarkarta-regexp-1.2.jar;
> > d:/ap2/lib/thirdparty/toplink.jar;     d:/ap2/lib/thirdparty/junit.jar;
> >
> > d:/ap2/lib/thirdparty/log4j.jar;     d:/ap2/lib/thirdparty/struts.jar;
> >
> > d:/ap2/lib/thirdparty/servlet.jar;     d:/ap2/lib/thirdparty/tidy.jar;
> >
> > d:/ap2/lib/thirdparty/tools.jar;
> > d:/ap2/lib/thirdparty/toplinkall.jar;
> >    d:/ap2/lib/thirdparty/toplinksdk.jar;
> > d:/ap2/lib/thirdparty/toplinksdkxerces.jar;
> > d:/ap2/lib/thirdparty/toplinkx.jar;
> >
>d:/ap2/lib/thirdparty/xerces.jar;d:\Java\Lib;d:\bin\xutil.ZIP;d:\Java\Lib\SYMCLASS.ZIP;d:\Java\Lib\CLASSES.ZIP;d:\Java\Lib\COLLECTIONS.ZIP;d:\Java\Lib\ICEBROWSERBEAN.JAR;d:\Java\Lib\xml.JAR;d:\Java\Lib\SYMTOOLS.JAR;d:\swing-1.1\SWINGALL.JAR;d:\Bin\Components\SFC.JAR;d:\Bin\Components\SYMBEANS.JAR;d:\Java\Lib\DBAW.ZIP;d:\Bin\Components\DBAW_AWT.JAR;d:\Bin\Components\Databind.JAR;d:\Java\Lib\ERADTOOLS.JAR;d:\Java\Lib\ERADPUBLIC.JAR;d:\Java\Lib\servlet.jar;d:\Java\Lib\webserver.jar;d:\Bin\Components\templates.jar;d:\Java\Lib\javax_ejb.ZIP;d:\Java\Lib\jndi.jar;d:\Java\Lib\jts.zip;d:\Bin\Components\vcejbwl.jar;d:\Bin\sb;d:\Bin\sb\classes\sb.jar;.;'
> >     [javac] Compiling 272 source files to D:\ap2\websrc\WEB-INF\classes
> >     [javac] javac: invalid flag: -sourcepath
> >     [javac] use: javac
> > [-g][-O][-debug][-depend][-nowarn][-verbose][-classpath
> > path][-nowrite][-deprecation][-d dir][-J<runtime flag>] file.java...
> >
> > so it doesn't place the last few lines of the message n build.log file.
> > Is
> > it normal or am I messing something up here
> >
> > Thanks
> >
> > >From: "Pinar Bicioglu" <[EMAIL PROTECTED]>
> > >Reply-To: [EMAIL PROTECTED]
> > >To: [EMAIL PROTECTED]
> > >Subject: RE: place the output in a log file
> > >Date: Tue, 12 Jun 2001 18:48:04 -0000
> > >
> > >
> > >
> > >
> > >>From: "Jon Skeet" <[EMAIL PROTECTED]>
> > >>Reply-To: [EMAIL PROTECTED]
> > >>To: <[EMAIL PROTECTED]>
> > >>Subject: RE: place the output in a log file
> > >>Date: Tue, 12 Jun 2001 19:29:03 +0100
> > >>
> > >> > >If you run ant with the command-line option
> > >> > >-logfile myfile.log
> > >> > >then output will go to myfile.log
> > >> >
> > >> > Thanks for your help. I was using that before but what i want
> > >> > to do now is
> > >> > to produce a log file that lists the result of each build..
> > >>
> > >>Do you mean the result of each *target*? (-logfile does exactly the
> > >>result of each build, as far as I'm aware.)
> > >>
> > >No I meant the result of each "build".Actually I used the <ant> task as
> > the
> > >following.
> > >
> > ><ant antfile="javasrc\server\build.xml" dir="javasrc\server"
> > target="main"
> > >output="build.log" /> and placed it in my "main" targets which depends
> > on
> > >"compile-all". But it seems like it is not working
> > >
> > >_________________________________________________________________
> > >Get your FREE download of MSN Explorer at http://explorer.msn.com
> > >
> >
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at http://explorer.msn.com
> >
>
>
>=====
>([EMAIL PROTECTED])
>
>
>
>__________________________________________________
>Do You Yahoo!?
>Get personalized email addresses from Yahoo! Mail - only $35
>a year!  http://personal.mail.yahoo.com/

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

Reply via email to