Project cleaning can fail on Windows:

12:40 | INFO  | s.e.m.b.GenerateSourcesBuilder - Cleaning and generating sources for language project eclipse:///relations
12:40 | ERROR | s.e.m.b.GenerateSourcesBuilder - Cannot clean language project eclipse:///relations; build failed unexpectedly
org.apache.commons.vfs2.FileSystemException: Could not delete "eclipse:///relations/include/relations-java.jar".
	at org.apache.commons.vfs2.provider.AbstractFileObject.deleteSelf(AbstractFileObject.java:848) ~[commons-vfs2-2.0.jar:2.0]
	at org.apache.commons.vfs2.provider.AbstractFileObject.delete(AbstractFileObject.java:907) ~[commons-vfs2-2.0.jar:2.0]
	at org.metaborg.spoofax.meta.core.SpoofaxMetaBuilder.clean(SpoofaxMetaBuilder.java:200) ~[org.metaborg.spoofax.meta.core_1.5.0.20160115-163802-new-spoofax-plugin.jar:na]
	at org.metaborg.spoofax.eclipse.meta.build.GenerateSourcesBuilder$2.run(GenerateSourcesBuilder.java:73) ~[org.metaborg.spoofax.eclipse.meta_1.5.0.20160115-163802-new-spoofax-plugin.jar:na]
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2241) [org.eclipse.core.resources_3.10.1.v20150725-1910.jar:na]
	at org.metaborg.spoofax.eclipse.meta.build.GenerateSourcesBuilder.clean(GenerateSourcesBuilder.java:83) [org.metaborg.spoofax.eclipse.meta_1.5.0.20160115-163802-new-spoofax-plugin.jar:na]
	at org.metaborg.spoofax.eclipse.meta.build.Builder.clean(Builder.java:70) [org.metaborg.spoofax.eclipse.meta_1.5.0.20160115-163802-new-spoofax-plugin.jar:na]
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:736) [org.eclipse.core.resources_3.10.1.v20150725-1910.jar:na]
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) [org.eclipse.equinox.common_3.7.0.v20150402-1709.jar:na]
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:205) [org.eclipse.core.resources_3.10.1.v20150725-1910.jar:na]
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:245) [org.eclipse.core.resources_3.10.1.v20150725-1910.jar:na]
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:300) [org.eclipse.core.resources_3.10.1.v20150725-1910.jar:na]
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) [org.eclipse.equinox.common_3.7.0.v20150402-1709.jar:na]
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:303) [org.eclipse.core.resources_3.10.1.v20150725-1910.jar:na]
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:262) [org.eclipse.core.resources_3.10.1.v20150725-1910.jar:na]
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:402) [org.eclipse.core.resources_3.10.1.v20150725-1910.jar:na]
	at org.eclipse.core.internal.resources.Project$1.run(Project.java:556) [org.eclipse.core.resources_3.10.1.v20150725-1910.jar:na]
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2241) [org.eclipse.core.resources_3.10.1.v20150725-1910.jar:na]
	at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:534) [org.eclipse.core.resources_3.10.1.v20150725-1910.jar:na]
	at org.eclipse.core.internal.resources.Project.build(Project.java:111) [org.eclipse.core.resources_3.10.1.v20150725-1910.jar:na]
	at org.eclipse.ui.internal.ide.dialogs.CleanDialog.doClean(CleanDialog.java:323) [org.eclipse.ui.ide_3.11.0.v20150825-2158.jar:na]
	at org.eclipse.ui.internal.ide.dialogs.CleanDialog$1.runInWorkspace(CleanDialog.java:153) [org.eclipse.ui.ide_3.11.0.v20150825-2158.jar:na]
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39) [org.eclipse.core.resources_3.10.1.v20150725-1910.jar:na]
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) [org.eclipse.core.jobs_3.7.0.v20150330-2103.jar:na]
Caused by: org.eclipse.core.internal.resources.ResourceException: Problems encountered while deleting resources.
	at org.eclipse.core.internal.resources.Resource.delete(Resource.java:794) ~[org.eclipse.core.resources_3.10.1.v20150725-1910.jar:na]
	at org.eclipse.core.internal.resources.Resource.delete(Resource.java:749) ~[org.eclipse.core.resources_3.10.1.v20150725-1910.jar:na]
	at org.metaborg.spoofax.eclipse.resource.EclipseResourceFileObject.doDelete(EclipseResourceFileObject.java:185) ~[org.metaborg.spoofax.eclipse_1.5.0.20160115-163802-new-spoofax-plugin.jar:na]
	at org.apache.commons.vfs2.provider.AbstractFileObject.deleteSelf(AbstractFileObject.java:837) ~[commons-vfs2-2.0.jar:2.0]
	... 23 common frames omitted

Restarting Eclipse, canceling the update editors will allow a clean.

Eclipse: epp.package.java 4.5.1.20150917-1200
Spoofax: org.metaborg.spoofax.eclipse 1.5.0.20160115-163802-new-spoofax-plugin
System: Windows 10 amd64 10.0
Submitted by Daco Harkes on 29 January 2016 at 12:47

On 29 January 2016 at 12:52 Gabriël Konat commented:

That’s a Windows issue, it likes to lock files, which then cannot be deleted. I cannot do anything about that, unless if you know of a way to unlock and delete files on Windows via Java.


On 29 January 2016 at 16:12 Daco Harkes commented:

Maybe graceful degradation?


On 24 February 2016 at 15:10 Gabriël Konat tagged windows

Log in to post comments