Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ant-dev] Ant Output capture.

Register a build listener and then you can do whatever you wish with the
output
See AntRunner#addBuildListener(String)

See the TestBuildListener and AntTestChecker for an example of capturing and
manipulating Ant output.
These can be found in the org.eclipse.ant.core.tests plugin

HTH
Darins

----- Original Message ----- 
From: "Vijay" <vijay.utnal@xxxxxxxxx>
To: <platform-ant-dev@xxxxxxxxxxx>
Sent: Thursday, May 13, 2004 8:43 PM
Subject: [platform-ant-dev] Ant Output capture.


> Hi All,
>
> I am trying to execute ant on Clicking a Custom Menu . I  have written the
> following snippet.
> Now I need to capture the output of the ant execution into a StringBuffer.
> Can anybody help?
>
> String ANT_RUNNER_ARGUMENTS = "-Dmessage=Building -verbose";
> AntRunner l_objRunner = new AntRunner();
> l_objRunner.setBuildFileLocation(l_strBuildFile);
> l_objRunner.setArguments(ANT_RUNNER_ARGUMENTS);
> try{
> l_objRunner.run();
> }catch(Exception e){
> }
>
> Regards,
> Vijay.
>
>
> _______________________________________________
> platform-ant-dev mailing list
> platform-ant-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/platform-ant-dev
>




Back to the top