Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-ant-dev] Run Ant outside of Launch Configurations?

Thanks, Darin.
 
This is exactly what I'm looking for. Based on this I can propose:
 
1. Immediate term builds won't have console output.
2. Short term port to launch configs to reenable console output.
 
Cheers.
 
-Naresh
 
-----Original Message-----
From: Darin Wright [mailto:Darin_Wright@xxxxxxxxxx]
Sent: Tuesday, September 09, 2003 2:03 PM
To: platform-ant-dev@xxxxxxxxxxx
Subject: RE: [platform-ant-dev] Run Ant outside of Launch Configurations?


Disclaimer: There was no public API in 2.0 or 2.1 for external tools, or Ant. It has changed, and continues to change. There is no doc on migration because the classes were not API, and were subject to change.

If you want console output in 2.1 and 3.0, you need to use launch configuraitons. The launch config accepts a fully qualified build file name via the attribute IExternalToolConstants.ATTR_LOCATION. You should not need to use an IFile - that is simply used by the launch shortcut which is file (workspace) based.

You may want to see the following launch framework articles for hints, tips, and examples of using launch configurations programatically:

http://www.eclipse.org/articles/Article-Launch-Framework/launch.html
http://www.eclipse.org/articles/Article-Java-launch/launching-java.html


Darin




"Sikha, Naresh" <Naresh.Sikha@xxxxxxxxxx>
Sent by: platform-ant-dev-admin@xxxxxxxxxxx

09/09/2003 03:26 PM
Please respond to platform-ant-dev

       
        To:        "'platform-ant-dev@xxxxxxxxxxx'" <platform-ant-dev@xxxxxxxxxxx>
        cc:        
        Subject:        RE: [platform-ant-dev] Run Ant outside of Launch Configurations?



Thanks, Darin.
 
This is getting me further along the launch configuration path, but, perhaps, not closer to my goal.
 
Here is my goal: I would like to run Ant within Eclipse so that the output can go to the Eclipse console, but that the Ant buildfile may be located anywhere - just like invoking Ant with the '-f' argument.
 
In Eclipse 2.0 this was accomplished easily using the AntRunner and setting the buildfile to an arbitrary string and the logger class to 'org.eclipse.ui.externaltools.internal.ui.ant.AntBuildLogger'.
 
In Eclipse 2.1 the AntRunner is still there but the AntBuildLogger is not. I understand it is in an 'internal' package marking it as subject to change/removal, but I can't seem to find a replacement.
 
Q: Is there a replacement to AntBuildLogger that I may have overlooked?
 
So my simple goal is to run AntRunner over an aribitrary buildfile (in the workspace or outside of it) passing it a logger class name that will output the logs into the Eclipse console.
 
I started looking at the AntLaunchShortcut class again in an 'internal' package. Now I'm down the rabbit hole of working with Launch Configurations. I found that the LaunchConfiguration requires an IFile object which is only valid under the workspace (references outside the workspace return null).
 
Q: Is there any, simple, middle ground between the Eclipse 2.0 AntBuildLogger and the Eclipse 2.1 AntLaunchShortcut/LaunchConfigurations? Alternatively, is there documentation on how to migrate from AntRunner/AntBuildLogger to LaunchConfigurations?
 
I'm also not well versed with all the developments between Eclipse 2.0 and Eclipse 2.1. If there are pieces of documentation that describe these changes at a higher level, then I think I can work from them back down to my specific example.
 
Thanks for your help.
 
-Naresh
-----Original Message-----
From:
Darin Wright [mailto:Darin_Wright@xxxxxxxxxx]
Sent:
Tuesday, September 09, 2003 11:54 AM
To:
platform-ant-dev@xxxxxxxxxxx
Subject:
Re: [platform-ant-dev] Run Ant outside of Launch Configurations?


Mark the launch configuration as private - @see IDebugUIConstants.ATTR_PRIVATE


Darin



"Sikha, Naresh" <Naresh.Sikha@xxxxxxxxxx>
Sent by: platform-ant-dev-admin@xxxxxxxxxxx

09/09/2003 01:23 PM
Please respond to platform-ant-dev

       
       To:        "'platform-ant-dev@xxxxxxxxxxx'" <platform-ant-dev@xxxxxxxxxxx>

       cc:        

       Subject:        [platform-ant-dev] Run Ant outside of Launch Configurations?




If this isn't the appropriate list, the recommended list to post to would be greatly appreciated.

 
Platform-ant-dev,

 

Is it possible to run Ant outside of the launch configuration mechanism with Eclipse 2.1.1 or greater? I would like to use Ant run run a batch job, initiated from an Eclipse plugin, capturing the output to the Ant console view, but not have the invocation referenceable in the Launch Configurations window.

 

Thanks for your feedback.

 

-Naresh

 

Naresh Sikha
Senior Staff, Technology Solutions
Charles Schwab & Co., Inc.
215 Fremont Street / SF215FMT-06-274
San Francisco, CA 94105-2306
W: 415-667-8071
E:
naresh.sikha@xxxxxxxxxx
WARNING
: All email sent to this address will be received by the Charles Schwab & Co., Inc. corporate email system and is subject to archival and review by someone other than the recipient.


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.510 / Virus Database: 307 - Release Date: 8/14/2003


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.510 / Virus Database: 307 - Release Date: 8/14/2003


Back to the top