Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ant-dev] AntHelper example and capturing output


I am not familiar with the particulars of the AntHelper but I can help you with setting additional build listeners.

The semantics of these arguments are defined by Apache Ant not Eclipse.
Therefore these are just tool arguments and should be specified in the working copy using IExternalToolConstants.ATTR_TOOL_ARGUMENTS.  See the ExternalToolsMainTab.

You can only have one logger (which you can change away from the AntProcessBuildLogger...but you will lose the Console integration etc.) but you can specify any number of listeners.
Specifying a listener should be all you require: configuration.setAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS,  "-listener your.cool.Listener");

In 3.1 you can specify any launch configuration to log to a file...have/can you consider this approach? See the implementation in the org.eclipse.debug.ui.CommonTab

HTH
Darins




Kevin James <rincewind@xxxxxxxxxx>
Sent by: platform-ant-dev-admin@xxxxxxxxxxx

01/20/2005 10:14 AM

Please respond to
platform-ant-dev

To
platform-ant-dev@xxxxxxxxxxx
cc
Subject
[platform-ant-dev] AntHelper example and capturing output





Hi

After trawling through the mailing list archives to find a solution to
running Ant programatically, I found the AntHelper example, which has
fixed my problem. However, I want to run the Ant build as part of a
longer process, and I want to capture all the output (from the calling
process and the ant process) into a single console.

I can't find any way to do this - at the moment, I create a console, do
some work and some output, then call the AntHelper class which creates
its own console with the title set to the buldfile name (I'm guessing
here that this is because the Ant code is using a default
AntProcessBuildLogger), then any work done after the Ant process goes to
the original console I created.

I'm thinking that there must be some way to set a build logger through
setting an attribute on the ILaunchConfigurationWorkingCopy, but I've
looked at the constants in IAntLaunchConfigurationConstants,
IExternalToolConstants and IDebugUIConstants and nothing seems
appropriate.

Am I missing something, or is this functionality not present?

Cheers,
KEv.


_______________________________________________
platform-ant-dev mailing list
platform-ant-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-ant-dev


Back to the top