ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <DDevie...@lgc.com>
Subject RE: Capture Javac output
Date Wed, 02 Mar 2005 17:25:57 GMT
Right, I agree. However, in case you persist in the programmatic way,
have a look at BuildLogger and BuildListener, and how they are hooked up
to the Project. You could use DefaultLogger, setting the output and
error PrintStream to your file, achieving what you want. --DD

> -----Original Message-----
> From: Anderson, Rob (Global Trade) [mailto:Rob.Anderson@nike.com]
> I would suggest writting a build.xml and running Ant, rather than
> programming a class to do your compile. Then it becomes as easy as
running
> a command and capturing the output.
> 
> -Rob A
> 
> > -----Original Message-----
> > From: Andre Dantas Rocha [mailto:ad-rocha@uol.com.br]
> > I'm compiling some java files using an Ant project:
> >
> > Project project = createProject();
> >  Javac javac = (Javac) project.createTask("javac");
> > javac.init();
> > ...
> > javac.perform();
> >
> > And would like to capture the output messages in a log file.
> >
> > How can I do that?
> >
> > Thanks,

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message