Community
Participate
Working Groups
When an Ant builder fails, the Eclipse Ant plug-in should create a problem marker on the Ant build file and include the error message. When implementing bug 463236, it happened to me that a snippet evaluation was still running in a runtime Eclipse. Since that locked the /org.eclipse.jdt.debug.ui/snippetsupport.jar file, the Ant builder that is configured on that project failed. The failure was not obvious to me, since it was only visible in the console for that build, but not as an error marker on the build file. Console output: ------------------------------------ Buildfile: C:\e\w\master\git\eclipse.jdt.debug\org.eclipse.jdt.debug.ui\scripts\buildExtraJAR.xml properties: init: clean: [delete] Deleting: C:\e\w\master\git\eclipse.jdt.debug\org.eclipse.jdt.debug.ui\snippetsupport.jar BUILD FAILED C:\e\w\master\git\eclipse.jdt.debug\org.eclipse.jdt.debug.ui\scripts\buildExtraJAR.xml:50: Unable to delete file C:\e\w\master\git\eclipse.jdt.debug\org.eclipse.jdt.debug.ui\snippetsupport.jar
For problems reported by javac or ecj, this is already possible (bug 133184, filed bug 509461 to enable the feature by default). The implementation would best get the build result directly from the invocation of the Ant task. If that's not possible, then looking for "BUILD FAILED" in the output may be an option.
Looks like this is already implemented, but in a wrong way. Compile errors should be represented as markers, not as log entries like this: eclipse.buildId=4.7.0.I20161219-0145 java.version=1.8.0_102 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US Framework arguments: -showlocation Command-line arguments: -os win32 -ws win32 -arch x86_64 -data C:\e\w\master -clean -consolelog -showlocation -console -debug C:\e\w\debug-options.properties org.eclipse.ant.launching Error Mon Dec 19 16:39:38 CET 2016 Failure of Background Ant Build org.eclipse.core.runtime.CoreException: C:\e\w\master\git\eclipse.jdt.ui\org.eclipse.jdt.ui\scripts\build_jar-in-jar-loader.xml:22: Compile failed; see the compiler error output for details. at org.eclipse.ant.core.AntRunner.handleInvocationTargetException(AntRunner.java:448) at org.eclipse.ant.core.AntRunner.run(AntRunner.java:380) at org.eclipse.ant.internal.launching.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:270) at java.lang.Thread.run(Thread.java:745) Caused by: C:\e\w\master\git\eclipse.jdt.ui\org.eclipse.jdt.ui\scripts\build_jar-in-jar-loader.xml:22: Compile failed; see the compiler error output for details. at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1181) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:936) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:435) at org.apache.tools.ant.Target.performTasks(Target.java:456) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405) at org.apache.tools.ant.Project.executeTarget(Project.java:1376) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:36) at org.apache.tools.ant.Project.executeTargets(Project.java:1260) at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:711) at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:531) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.ant.core.AntRunner.run(AntRunner.java:371) ... 2 more
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. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. 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. -- The automated Eclipse Genie.