How to prevent that Gradle in VS Code modify the Eclipse project files?

Ever I start VS Code it modify the file .project and add block:

	<filteredResources>
		<filter>
			<id>1741960946643</id>
			<name></name>
			<type>30</type>
			<matcher>
				<id>org.eclipse.core.resources.regexFilterMatcher</id>
				<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
			</matcher>
		</filter>
	</filteredResources>

It also modify the Eclipse settings in the .settings directory. For example it set project specific compiler setting. But I want use the globale settings from the Eclipse IDE.

My Gradle build script contains the eclipse plugin via apply plugin: 'eclipse'. It there an option to disable the plugin inside VS Code inside the script or in VS Code? How can I detect that inside of VS Code?

The plugin should not modify any files just by being applied.
Modification of files only happens if you call any of the eclipse... tasks and those are not wired to anything by default.
Maybe your build configuration somehow wires those tasks so that they are executed when they should not.

Now I have:

  • delete the eclipse plugin from my Gradle script
  • deactivate the Gradle plugin
  • deactivate some Java plugin

The problem exists continue. Seems it is not Gradle related.

1 Like

It was the Plugin “Language Support for Java™ by Red Hat”. It was part of a Java plugin bundle.

1 Like