Community
Participate
Working Groups
[Eclipse 3.2 M6] This is Bug#128552, but I can't find a way of reopening it. When I select an target in the Ant Outline View and chose "Run As.." - "Ant Build", all I get is a dialog saying "Unable to find ant file to run". The file includes other ant files, and the problem happens both with targets defined in the file itself and targets defined in one of the included files. There are no related errors in the Error Log.
So I still need to find out what is different about your setup or the Ant buildfile as I cannot reproduce the problem. This is for all Ant buildfiles in all projects or locations or just one particular buildfile?
It does work for some build files, e.g. Eclipse-generated ones. Please see bug#134497 for an example build.xml where no target can be invoked from the Ant Outline View.
Worksforme on 3.2M6: Selected the default target From the Ant view> Run As>Ant Build Build output: Buildfile: C:\Darins\workspaces\0218\Ant Testing\134497.xml [taskdef] Could not load definitions from resource clovertasks. It could not be found. default: [echo] =================================================================== [echo] Welcome to JPOX build. [echo] =================================================================== [taskdef] Could not load definitions from resource clovertasks. It could not be found. BUILD FAILED C:\Darins\workspaces\0218\Ant Testing\134497.xml:101: The following error occurred while executing this line: Target `${build.setting.default.target}' does not exist in this project. Total time: 1 second
When I use a fresh workspace with only that project imported, it works for me as well.
I get this same error. For me, it is only some Ant files that won't run - two out of 5 right now. These are all manually written ant files dating of before I started using Eclipse. All works through command line. On one project where this happen, I tried creating a new ant file using the eclipse -> export to ant feature. Even that eclipse generated ant file would not run. None of those ant files include other files. I tried yesterday using 3.2M6 but this is still an issue.
Additional note: I can run the file through the external tools but not from the Ant View.
(In reply to comment #6) > Additional note: I can run the file through the external tools but not from the > Ant View. Did you try using a fresh workspace? That made it work again for me.
It works with a fresh workspace... This should be fixed so it does not corrupt! It's a bit anoying to have to resetup your workspace. Otherwise, I can now use the Ant view again. Thanks. (In reply to comment #7) > (In reply to comment #6) > > Additional note: I can run the file through the external tools but not from the > > Ant View. > > Did you try using a fresh workspace? That made it work again for me. >
I would love to fix this problem but I have not been able to reproduce and I do not have a technical reason for the failure to investigate.
I have seen this bug as well (in 3.2 RC3). On all my ant files in multiple projects. All the same ant files worked fine in 3.1.2. I have seen even stranger behaviour: if the ant outline (in the Ant View) is collapsed, I can double-click the top of the tree and it runs fine, after a fresh Eclipse startup. If I open the outline, I can not run any of the tasks, including from the top. If I collapse the tree again, it is broken, and I can't run the default again. Based on this behaviour, perhaps the problem lies in opening the Ant outline? Just a guess, as I have not worked on Eclipse myself. (Note, I did not destroy my workspace when upgrading to 3.2RC3 from 3.1.2. Is there anything stored in the workspace/project configs for Ant)?
(In reply to comment #9) > I would love to fix this problem but I have not been able to reproduce and I do > not have a technical reason for the failure to investigate. Hi Darin, you didn't say whether you tried with a 3.1 workspace, so unless you successfully did so, maybe a note should be given in response to "[eclipse-dev] Workspace compatibility section of readme"?
https://bugs.eclipse.org/bugs/show_bug.cgi?id=134416 I am experiencing this issue as well. I just installed 3.2. My workspace was created in 3.1.2. I keep getting "Unable to find an ant file to run" message. If I Right click on the ant task and go through Run As External Tools, it will run. I can not find anything relevant in the error log (that is obvious to me). In any case I'm pasting in the last few exceptions I see...If I try to Run As Ant Build (or double click) to get the error message, nothing is freshly added to the error log... !ENTRY org.eclipse.jface 4 2 2006-08-02 16:05:11.262 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface". !STACK 0 java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/ui/viewsupport/ListContentProvider at org.jboss.ide.eclipse.xdoclet.run.ui.ConfigurationListViewer.<init>(ConfigurationListViewer.java:115) at org.jboss.ide.eclipse.xdoclet.run.ui.properties.ConfigurationPropertyPage.createContents(ConfigurationPropertyPage.java:329) at org.eclipse.jface.preference.PreferencePage.createControl(PreferencePage.java:233) at org.eclipse.jface.preference.PreferenceDialog.createPageControl(PreferenceDialog.java:1403) at org.eclipse.jface.preference.PreferenceDialog$12.run(PreferenceDialog.java:1162) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:843) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149) at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1156) at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:439) at org.eclipse.jface.preference.PreferenceDialog$8.selectionChanged(PreferenceDialog.java:661) at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:839) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:843) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149) at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:837) at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1143) at org.eclipse.jface.viewers.StructuredViewer$5.widgetSelected(StructuredViewer.java:1163) at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:236) at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:230) at org.eclipse.jface.util.OpenStrategy$3.run(OpenStrategy.java:404) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3325) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971) at org.eclipse.jface.window.Window.runEventLoop(Window.java:820) at org.eclipse.jface.window.Window.open(Window.java:796) at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:156) at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952) !ENTRY org.eclipse.core.resources 4 2 2006-08-02 16:06:52.794 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources". !STACK 0 java.lang.NullPointerException at org.jboss.ide.eclipse.core.ProjectChangeListener.resourceChanged(ProjectChangeListener.java:46) at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:280) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:274) at org.eclipse.core.internal.events.NotificationManager.handleEvent(NotificationManager.java:246) at org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:250) at org.eclipse.core.internal.resources.Project.close(Project.java:186) at org.eclipse.ui.actions.CloseResourceAction.invokeOperation(CloseResourceAction.java:184) at org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:134) at org.eclipse.ui.actions.WorkspaceAction$2.runInWorkspace(WorkspaceAction.java:429) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58) !ENTRY org.eclipse.core.resources 4 2 2006-08-02 16:06:52.794 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources". !STACK 0 java.lang.NullPointerException at org.jboss.ide.eclipse.core.ProjectChangeListener.resourceChanged(ProjectChangeListener.java:46) at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:280) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:274) at org.eclipse.core.internal.events.NotificationManager.handleEvent(NotificationManager.java:246) at org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:250) at org.eclipse.core.internal.resources.Project.close(Project.java:186) at org.eclipse.ui.actions.CloseResourceAction.invokeOperation(CloseResourceAction.java:184) at org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:134) at org.eclipse.ui.actions.WorkspaceAction$2.runInWorkspace(WorkspaceAction.java:429) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58) Some system info... *** Date: Wed Aug 02 16:27:52 EDT 2006 *** Platform Details: *** System properties: awt.toolkit=sun.awt.windows.WToolkit eclipse.buildId=M20060629-1905 eclipse.commands=-os win32 -ws win32 -arch x86 -launcher C:\Program Files\eclipse\eclipse.exe -name Eclipse -showsplash 600 -exitdata 8a4_50 -vm C:\WINDOWS\system32\javaw.exe eclipse.ee.install.verify=false eclipse.product=org.eclipse.sdk.ide eclipse.startTime=1154457930979 eclipse.vm=C:\WINDOWS\system32\javaw.exe eclipse.vmargs=-Xmx256M -jar C:\Program Files\eclipse\startup.jar eof=eof file.encoding=Cp1252 file.encoding.pkg=sun.io file.separator=\ java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment java.awt.printerjob=sun.awt.windows.WPrinterJob java.class.path=C:\Program Files\eclipse\startup.jar java.class.version=49.0 java.endorsed.dirs=C:\Program Files\Java\jre1.5.0_06\lib\endorsed java.ext.dirs=C:\Program Files\Java\jre1.5.0_06\lib\ext java.home=C:\Program Files\Java\jre1.5.0_06 java.io.tmpdir=C:\DOCUME~1\rcook\LOCALS~1\Temp\ java.library.path=C:\WINDOWS\system32;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\apache-ant-1.6.5\bin;C:\Program Files\PostgreSQL\8.1\bin java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition java.runtime.version=1.5.0_06-b05 java.specification.name=Java Platform API Specification java.specification.vendor=Sun Microsystems Inc. java.specification.version=1.5 java.vendor=Sun Microsystems Inc. java.vendor.url=http://java.sun.com/ java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi java.version=1.5.0_06 java.vm.info=mixed mode, sharing java.vm.name=Java HotSpot(TM) Client VM java.vm.specification.name=Java Virtual Machine Specification java.vm.specification.vendor=Sun Microsystems Inc. java.vm.specification.version=1.0 java.vm.vendor=Sun Microsystems Inc. java.vm.version=1.5.0_06-b05 line.separator=
(In reply to comment #10) > if the ant outline (in the Ant View) is collapsed, I can > double-click the top of the tree and it runs fine, after a fresh Eclipse > startup. If I open the outline, I can not run any of the tasks > > (Note, I did not destroy my workspace when upgrading to 3.2RC3 from 3.1.2. Same here.. I tried to remove all ant-related config files from my .metadata (and restart Eclipse) but the behaviour is still there.. If I open the outline, it won't run any of the tasks
(In reply to comment #13) I noticed that even if the Ant view won't run tasks, the Outline view (while a Ant build file is opened in the editor) DOES work.. (Eclipse 3.2 with a 3.1.2-generated workspace)
I experienced the same issue after upgrading from eclipse 3.1.2 to 3.2.0. The workspace was created using eclipse 3.1.2 wher all ant targets used to run fine. After installation of eclipse 3.2.0 I get an error message saying: "Unable to find ant file to run". All those ant targets work fine on the console.
I tried creating a new workspace with 3.2 and then importing my projects (made with 3.1.x), but the problem is still there :(
I found out that even while using the 3.1.2-generated workspace there's a tweak to get a working Ant view, but my setup is a bit unusual, so YMMV. For various reasons my workspace contains projects that are not physical directories, but symlinks to directories outside the workspace.. If I try to run an Ant task from such a project it won't work, but if I close the project, remove the symlink, copy the real directory into the workspace, reopen the project and retry running Ant, everything is fine. I also noticed that while in "symlink mode" I can't drag an Ant script from the Package explorer to the Ant view, the view won't "catch" the file. In "real mode" instead drag and drop works.
I am seeing this with Eclipse 3.2.1. There is nothing being reported in any of the error logs. I have 7 projects all very similar to each other and I get this problem with 2 of them - from the ant view if I double click to call the target then the error message pops up 'Build Failed Unable to find Ant file to run' Are there any debug options I can use to help with this?
(In reply to comment #17) > I found out that even while using the 3.1.2-generated workspace there's a tweak > to get a working Ant view, but my setup is a bit unusual, so YMMV. > For various reasons my workspace contains projects that are not physical > directories, but symlinks to directories outside the workspace.. If I try to > run an Ant task from such a project it won't work, but if I close the project, > remove the symlink, copy the real directory into the workspace, reopen the > project and retry running Ant, everything is fine. > I also noticed that while in "symlink mode" I can't drag an Ant script from the > Package explorer to the Ant view, the view won't "catch" the file. In "real > mode" instead drag and drop works. > I had the same problem. However, I wasn't symlinking to folders, but my build.xml file was a symlink to an ant file outside of the workspace. I decided to use a hard link instead (ln without -s) and now everything is working.
I had this "unable to find an ant file to run" and solved by removing the UPPER case letters from the project directory's name. Intresingly I was able to run the default task even with the upper case directory name until I didnt opened the tree of the ant script.
Thanks to Szanto Peter - your suggestion has solved my rpoblem.
With my "strange setup" (projects symlinked into workspace) the problem is still there even with lowercase names :/
>I had this "unable to find an ant file to run" and solved by removing the UPPER >case letters from the project directory's name. Interestingly I was able to run >the default task even with the upper case directory name until I didnt opened >the tree of the ant script. I was able to fix it by renaming the project and directory. The original name had a capital letter pattern as such xxXXxxxx. What interesting is another project using ant build files worked fine with capital letters like XxxxXx.
In my case, the error occurs after the project is shared as a CM Synergy project. The same build script works without any issues before sharing, and I can get rid of the error by creating a new project pointing to the same source tree again. To reproduce the error, simply share the project with CM Snyergy and restart Eclipse. Note that the default target can be run w/o expanding the buid targets, but it will fail with the same error once the targets are expanded. This in working in 3.1.x and fails on both 3.2.2 and 3.3RC.
Created attachment 200817 [details] getting ant build bug
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant, please remove the "stalebug" whiteboard tag.