Gettinig Results from ANT [message #160832] |
Mon, 24 November 2003 04:14  |
Eclipse User |
|
|
|
Originally posted by: SteffenBoehme.web.de
Hi,
i've already posted a question about using the cvs-functionality from
eclipse to get informations about repositories and to receive and
transmit files from and to the repository etc.
now i know, that is is in the version 2.x not possible to do such a
think and i have a new plan ... with a new question :-)
if i use ant (the platform-intern version) with the !!existing!! api,
how can i during the runtime of the antscript or at the end of the
script get informations/results from the script?
for instance a ant-script shall connect to a repository and find out,
if the projects ".ProductivePackage" exsits and if so, than the script
shall find out, wich files with the extension ".packed" in this
projects exists and send this infos to the platform, so that i can
show they in a view ...
it could be made with an separate file ... the ant script write some
infos in this file and after the execution i read this file from the
platform and show the infos, but this way is not fine ... so is there
any other possibility? I have read about the method addBuildListener()
.... can i use they to get informations from the ant script?
If so, which class must i use as the parameter? RecorderEntry?
and which ant-task must i use to create such a buildEvent?
tnx for answers
Steffen
|
|
|
Re: Gettinig Results from ANT [message #164195 is a reply to message #160832] |
Mon, 01 December 2003 14:48  |
Eclipse User |
|
|
|
addBuildListener() or addBuildLogger() would likely be the correct means to
get the information from Ant.
For addBuildListener(String) you need to provide an implementation of
org.apache.tools.ant.BuildListener. For addBuildLogger(String) you need to
provide an implementation of org.apache.tools.ant.BuildLogger
For more on Ant see http://ant.apache.org/manual/
To programmatically launch an Ant build in Eclispe:
....
AntRunner runner = new AntRunner();
runner.setBuildFileLocation("c:/buildfiles/build.xml");
runner.addBuildLogger("org.your.implementation.SteffenBuildLogger ");
runner.run();
....
HTH
Darins
"Steffen B
|
|
|
Powered by
FUDForum. Page generated in 0.04166 seconds