Bug 26042 - Can't run Ant script with new Ant on MacOS X
Summary: Can't run Ant script with new Ant on MacOS X
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 2.1   Edit
Hardware: PC All
: P1 normal (vote)
Target Milestone: 2.1 M4   Edit
Assignee: Jared Burns CLA
QA Contact:
URL:
Whiteboard:
Keywords: core, ui
Depends on:
Blocks:
 
Reported: 2002-11-12 09:28 EST by Veronika Irvine CLA
Modified: 2002-11-25 21:05 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Veronika Irvine CLA 2002-11-12 09:28:50 EST
Tried Nightly build N200211110010 on mac.

Select an ANt XML script called make_carbon.xml in the packages view and select 
Run Ant... from the context menu.
No dialog pops up.  Busy indicator spins for a while then disappears.  Npothing 
in the .log file.

Went to preferences and turned on External Tools -> Work In Progress -> Use 
Launch Configurations and I got the message in the console:
make: Nothing to be done for 'all'.

I do not have a target called 'all'.
Comment 1 Veronika Irvine CLA 2002-11-12 11:56:00 EST
Tried again with Integration build I20021112

Now I get a dialog that asks me for the build script to run and when I select 
make_carbon.xml but nothing happens. I have the following log entry:

!SESSION Nov 06, 2002 08:55:17.230 ---------------------------------------------
java.version=1.3.1
java.vendor=Apple Computer, Inc.
BootLoader constants: OS=macosx, ARCH=ppc, WS=carbon, NL=en_US
Command-line arguments: -noupdate -consoleLog -os macosx -ws carbon -install file:/
Users
/veronikairvine/Desktop/eclipse/Eclipse_2.0.app/Contents/Resources/Java/
!ENTRY org.eclipse.core.runtime 2 1 Nov 06, 2002 08:55:17.232
!MESSAGE Problems encountered loading the plug-in registry.
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Nov 06, 2002 08:55:17.233
!MESSAGE /Users/veronikairvine/Desktop/eclipse/Eclipse_2.0.app/Contents/Resources/
Java/p
lugins/org.eclipse.ui.externaltools_2.1.0/plugin.xml: Unknown attribute "delegate" for e
lement "extension" ignored.
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Nov 06, 2002 08:55:17.238
!MESSAGE /Users/veronikairvine/Desktop/eclipse/Eclipse_2.0.app/Contents/Resources/
Java/p
lugins/org.eclipse.ui.externaltools_2.1.0/plugin.xml: Unknown attribute "modes" for elem
ent "extension" ignored.
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Nov 06, 2002 08:55:17.238
!MESSAGE /Users/veronikairvine/Desktop/eclipse/Eclipse_2.0.app/Contents/Resources/
Java/p
lugins/org.eclipse.ui.externaltools_2.1.0/plugin.xml: Unknown attribute "category" for e
lement "extension" ignored.
!ENTRY org.eclipse.core.resources 1 1 Nov 06, 2002 08:55:18.875
!MESSAGE Could not load library: libcore_2_0_5.jnilib.  This library provides platform-s
pecific optimizations for certain file-system operations.  This library is not present o
n all platforms, so this may not be an error.  The resources plugin will safely fall bac
k to using java.io.File functionality.
Comment 2 Darin Swanson CLA 2002-11-12 14:29:29 EST
The entries from the 20021112 build look pretty old (from Nov 6) so I don't see 
how they could be relevant?.  We did have a problem with the plugin.xml for 
external tools at that time.  
Are you using the new work in progress launch configuration support?
Have you tried running the script from the Ant view?
Comment 3 Jared Burns CLA 2002-11-13 14:54:15 EST
Veronika, is this a dup of Bug 26112? Is the script just running?
Comment 4 Veronika Irvine CLA 2002-11-13 15:29:25 EST
The script is not running.  Nothing happens.

The dialog to configure teh Run Ant comes up once.  In this dialog I 
deselect "Run default target".  Nothing appears in the available targets list 
for me choose.

For SWT this problems means we can not self-host with M3 because we rely 
heavily on building our libraries using custom scripts. We also need o be able 
to flexibly choose which targets to run at run time.
Comment 5 Jared Burns CLA 2002-11-14 10:03:01 EST
If you deselect the "Run default target" button and don't add any targets to
the "active" list, no targets will be run when you "Run Ant" on the file. If
you're not seeing any targets in the available list, it's probably because
you've only got "sub targets" defined and these aren't shown by default. You
need to click the "Show sub targets" button to list them.

FYI, Ant defines "subtargets" as targets with no description attribute. Our UI
is consistent with the Ant commandline behavior.
Comment 6 Jared Burns CLA 2002-11-14 13:46:12 EST
D'oh! I see the problem. If you just click "Finish" on the first page of the
wizard that appears when you first say "Run Ant", the active targets list isn't
initialized.

The workaround to this problem is to go to the External Tools View and find the
tool for the file you're trying to run, right click on it, and select
"Properties". If you then just click on the "Targets" page and click OK, the
targets will be initialized.
Comment 7 Jared Burns CLA 2002-11-14 14:57:41 EST
Fixed. The "Run Ant" action now uses the launch config story, using a launch
configuration "shortcut" similar to the one used for Java launching.

If you say "Run Ant" on a script for which no launch configuration exists,
a default config will be created on that script and the dialog will be opened
on the new config so that you can change things (like the selected targets) and
then run the config. If you say "Run Ant" on a script for which a launch
config already exists, the existing config is run. Currently, we just run the
first config we find.
Comment 8 Jared Burns CLA 2002-11-14 14:58:06 EST
Please verify, DarinW.
Comment 9 Darin Wright CLA 2002-11-25 12:06:57 EST
I am finding that a new script is created each time I use the "Run Ant" action. 
I had a "foo.xml" script that echoed a simple text line, and each time I run, 
the external tools dialog opens with a new script "foo", "foo (1)", "foo (2)", 
etc.
Comment 10 Darin Wright CLA 2002-11-25 13:09:14 EST
I had a launch config in my workspace that refered to a non-existent ant file 
(but not the one I was trying to run). This makes the shortcut bail out when 
searching for existing scripts - due to a core exception when expanding the 
location for the non-existant script.

Fixed in AntLaunchShortcut. Please verify, Jared.
Comment 11 Jared Burns CLA 2002-11-25 21:05:56 EST
Verified.