Community
Participate
Working Groups
I just upgraded from 3.1M6 to 3.1.RC3 and again my ANT targets don't work anymore: !ENTRY org.eclipse.ant.core 4 1 2005-06-22 12:26:05.218 !MESSAGE Could not find one or more classes: "org.apache.tools.ant.BuildException". Please check the Ant classpath. !STACK 0 java.lang.NoClassDefFoundError: org/apache/tools/ant/BuildException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328) at java.lang.Class.getConstructor0(Class.java:2640) at java.lang.Class.newInstance0(Class.java:321) at java.lang.Class.newInstance(Class.java:303) at org.eclipse.ant.core.AntRunner.run(AntRunner.java:303) at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate.runInSameVM (AntLaunchDelegate.java:234) at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate.launch (AntLaunchDelegate.java:196) at org.eclipse.debug.internal.core.LaunchConfiguration.launch (LaunchConfiguration.java:590) at org.eclipse.debug.internal.core.LaunchConfiguration.launch (LaunchConfiguration.java:515) at org.eclipse.debug.internal.core.LaunchConfiguration.launch (LaunchConfiguration.java:152) at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.launchBuild (ExternalToolBuilder.java:176) at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.doBuildBasedOnSc ope(ExternalToolBuilder.java:164) at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.build (ExternalToolBuilder.java:83) at org.eclipse.core.internal.events.BuildManager$2.run (BuildManager.java:593) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:1044) at org.eclipse.core.runtime.Platform.run(Platform.java:783) at org.eclipse.core.internal.events.BuildManager.basicBuild (BuildManager.java:168) at org.eclipse.core.internal.events.BuildManager.basicBuild (BuildManager.java:202) at org.eclipse.core.internal.events.BuildManager$1.run (BuildManager.java:231) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:1044) at org.eclipse.core.runtime.Platform.run(Platform.java:783) at org.eclipse.core.internal.events.BuildManager.basicBuild (BuildManager.java:234) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop (BuildManager.java:253) at org.eclipse.core.internal.events.BuildManager.build (BuildManager.java:282) at org.eclipse.core.internal.resources.Workspace.build (Workspace.java:211) at org.eclipse.ui.actions.GlobalBuildAction$1.run (GlobalBuildAction.java:182) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76) !ENTRY org.eclipse.ant.core 4 1 2005-06-22 12:27:58.468 !MESSAGE Could not find one or more classes: "org.apache.tools.ant.BuildException". Please check the Ant classpath. !STACK 0 java.lang.NoClassDefFoundError: org/apache/tools/ant/BuildException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328) at java.lang.Class.getConstructor0(Class.java:2640) at java.lang.Class.newInstance0(Class.java:321) at java.lang.Class.newInstance(Class.java:303) at org.eclipse.ant.core.AntRunner.run(AntRunner.java:303) at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate$1.run (AntLaunchDelegate.java:215) at java.lang.Thread.run(Thread.java:595)
I noticed that Preferences > Ant > Runtime > Classpath > Ant Home Entries (Default) still hat the old ANT version number and not the included "1.6.5" version. So I had to manually change this Ant Home Entries to point to the included "C:/Programme/eclipse/plugins/org.apache.ant_1.6.5/lib/..." JARs. This is annoying and obsolete as we want to use the included ANT version of course - at least this should be the default. It makes no sense to install a new Eclipse version (with possible new ANT version) and the "Ant Home ENtries (Default)" point to a location that is invalid (because the old eclipse directory was renamed (e.g. "eclipse_old") but the new Eclipse ANT libs point to ".../eclipse/.../<old_version>/...".
Investigate post 3.1 if we can improve the migration when the Ant plugin version changes.
*** Bug 101150 has been marked as a duplicate of this bug. ***
The same happened when upgrading from Eclipse 3.2 to Eclipse 3.3 ... :-( ... I still had to manually change the classpath of ANT to the new Eclipse 3.3 files.
*** Bug 201418 has been marked as a duplicate of this bug. ***
Still the same bug in Eclipse 3.5 Galileo: my ANT tasks all didn't work anymore (Eclipse just started the target and never returned. I had (again) to replace all references to ANT 1.7.0 to Galileo's ANT 1.7.1 paths to get it working back again. The .log file contained: !ENTRY org.eclipse.ant.ui 4 120 2009-06-24 17:01:11.961 !MESSAGE Error logged from Ant UI: !STACK 0 java.net.SocketTimeoutException: Accept timed out at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390) at java.net.ServerSocket.implAccept(ServerSocket.java:453) at java.net.ServerSocket.accept(ServerSocket.java:421) at org.eclipse.ant.internal.ui.launchConfigurations.RemoteAntBuildListener$ServerConnection.run(RemoteAntBuildListener.java:95)
*** Bug 318157 has been marked as a duplicate of this bug. ***
*** Bug 170127 has been marked as a duplicate of this bug. ***
Still the same issue with Eclipse Helios (Version 3.6.2, Build id: M20110202-0800). All paths to the Eclipse ANT JARs point to the old files. => Once again, had to remove all entries and manually add the paths of Eclipse Helios ANT JARs ...
(In reply to comment #9) > Still the same issue with Eclipse Helios (Version 3.6.2, Build id: > M20110202-0800). All paths to the Eclipse ANT JARs point to the old files. => > Once again, had to remove all entries and manually add the paths of Eclipse > Helios ANT JARs ... I am wondering if this is a dupe of bug 325125. MH, what other plugins (if any) do you have installed? i.e. are you using a vanilla Eclipse platform, or do you have other software installed in it?
Plain vanilla (Java Developer Version) - but I always try to apply the automatic updates. I install every major Eclipse version separately. I also created a completely new workspace (after years of using the same).
(In reply to comment #11) > Plain vanilla (Java Developer Version) - but I always try to apply the > automatic updates. I install every major Eclipse version separately. I also > created a completely new workspace (after years of using the same). Out of curiosity, have you tried pressing the 'Restore Defaults' button on the Runtime preference page? It will completely reset the default Ant home locations to be that of the version of Ant shipped with your Eclipse installation.
Also out of curiosity do you have the following preference file in your workspace: <path to your workspace>.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.ant.core.prefs with an 'ant_home' entry in it? I am thinking that maybe along the way you have manually changed the Ant home location, which will then always be reused and not auto-update to the latest version that comes with Eclipse. If however you use the 'Restore Defaults' button on the Runtime pref page, these settings will be erased, and as mentioned you will always get the latest version of Ant in your default Ant home.
(In reply to comment #12) > (In reply to comment #11) > > Plain vanilla (Java Developer Version) - but I always try to apply the > > automatic updates. I install every major Eclipse version separately. I also > > created a completely new workspace (after years of using the same). > > Out of curiosity, have you tried pressing the 'Restore Defaults' button on the > Runtime preference page? It will completely reset the default Ant home > locations to be that of the version of Ant shipped with your Eclipse > installation. Nope, never seen this. I just clicked on it and now lots of entries in "Ant Home ENtries (Default)" were generated! So next time, I will try to click this button.
(In reply to comment #13) > Also out of curiosity do you have the following preference file in your > workspace: > > <path to your > workspace>.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.ant.core.prefs > > with an 'ant_home' entry in it? > > I am thinking that maybe along the way you have manually changed the Ant home > location, which will then always be reused and not auto-update to the latest > version that comes with Eclipse. If however you use the 'Restore Defaults' > button on the Runtime pref page, these settings will be erased, and as > mentioned you will always get the latest version of Ant in your default Ant > home. Nope, I just have org.eclipse.ant.ui.prefs and no other org.eclipse.ant.* files in this directory. (At least after pressing "Restore Defaults" after the post above.) So I hope, the next major Eclipse update will work as expected concerning integrated ANT.
(In reply to comment #15) > So next time, I will try to click this button. Provided you do not manually edit the default Ant home entries, you *should* never have to press it again. > Nope, I just have org.eclipse.ant.ui.prefs and no other org.eclipse.ant.* files > in this directory. (At least after pressing "Restore Defaults" after the post > above.) That is what we want to see, restoring the defaults for the page removes the custom preferences that would have been saved in the o.e.ant.core.prefs file. > So I hope, the next major Eclipse update will work as expected > concerning integrated ANT. So do I :)
Closing this as worksforme, MH if the problem comes back after your next Eclipse upgrade please reopen.
*** Bug 351744 has been marked as a duplicate of this bug. ***
Happened to me again when upgrading from Helios to Indigo. Should be reopened (I can't do that).
(In reply to comment #19) > Happened to me again when upgrading from Helios to Indigo. Should be reopened > (I can't do that). A new bug 366711 has been filed to track this. So, a reopen is not necessary!