Bug 17466 - Prompt for targets option
Summary: Prompt for targets option
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P2 enhancement (vote)
Target Milestone: 2.1 M5   Edit
Assignee: Jared Burns CLA
QA Contact:
URL:
Whiteboard:
Keywords: ui
Depends on:
Blocks:
 
Reported: 2002-05-23 15:51 EDT by gavlin CLA
Modified: 2003-01-14 09:30 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gavlin CLA 2002-05-23 15:51:15 EDT
I would like to configure an "Ant" External Tool to prompt for Ant
targets using the "Run Ant" GUI rather than having to hard code the "tool
arguments" ant targets using ${ant_target:...}? I have some build.xml
files that must be stored outside the workspace due to Eclipse project
nesting constraints. As a result, I can't use the "Run Ant" GUI to invoke
them. It would be nice to optionally hook the "Run Ant" GUI to External
Tool configurations.
Comment 1 Simon Arsenault CLA 2002-05-29 12:10:20 EDT
When you are using the New/Edit External Tools dialog, you can press 
the "Browse Variables" button and select "Ant Targets". This will give you a 
list of Ant targets you can run (select as many as you want). It will generate 
the variables for you in the arguments field.

You could also create a simple project and for its content location point it to 
the directory where your ant script files are. Then, they would show up and you 
could use "Run Ant..."
Comment 2 gavlin CLA 2002-05-29 14:28:33 EDT
Yes, I know about the "Browse Variables" feature. But, I have a build.xml file 
with lots of targets which get used in lots of different combinations. I don't 
want to create lots of different "tools" with hard-coded targets that attempt 
to cover all various combinations. I want the target selection to be defined at 
run-time.

In response to your second point, my build.xml file lives at the root of my 
source tree. I have numerous project directories underneath the root, each of 
which has a corresponding Eclipse project in the workspace. Unfortunately, 
Eclipse will not allow me to define a project at the root level since it 
Eclipse disallows project nestings. Myself and lots of other people previously 
worked-around this limitation by creating symbolic links from the eclipse data 
directory to the actual root project directory. With the new External Tools 
feature, this symbolic linking hack is no longer necessary for most folks, I 
suspect. Most people use these root projects predominantly for master ant 
activities. So, it would be very useful if External Tools provided a "Run 
Ant..." like feature for build.xml files that must live outside the workspace. 
Does that make sense?
Comment 3 Simon Arsenault CLA 2002-05-30 14:03:25 EDT
Valid request. Defer until after release 2.0 when the UI will be evaluated for 
enhancements.
Comment 4 Simon Arsenault CLA 2002-09-06 14:50:40 EDT
The new external tool support will allow you to configure the tool to prompt 
for targets before running or you can run a tool and force it to prompt for 
targets (Run With... action)

Note: new external tool work is not yet released to the head stream and won't 
for a while yet.
Comment 5 Jared Burns CLA 2002-09-27 14:58:58 EDT
This bug has not been fixed.
Comment 6 Darin Wright CLA 2002-11-15 10:27:36 EST
Need a prompt for targets option for ant scripts. I beleive the generic "prompt 
for arguments" option/tab should be removed from the Ant launch tabs, and 
replaced with an Ant specific tab.
Comment 7 Darin Wright CLA 2003-01-14 09:30:55 EST
In the current code base, there are two features that solve this problem.

(1) use the ant view to dynamically select and run targets
(2) use the "Run Ant..." action from the navigator menu with a selected ant 
build file. You will be prompted with the launch config before executing, where 
you can select targets.

Marking as "works for me". Please enter a new bug/feature request if this does 
not suffice.