Removing entry from classpath is not reflected in Buildship's generated .classpath

issue-resolved

(Nick) #1

I have a multiproject build that applies the eclipse plugin to all subprojects:

allprojects {
    apply plugin: 'java'
    apply plugin: 'eclipse'
}

In one of the subprojects, I attempt to modify the .classpath file by removing an entry:

eclipse.classpath.file.whenMerged {
    entries.removeAll { it.kind == 'src' && it.path == 'src/main/java' }
}

I can’t get Buildship to generate a .classpath file that reflects this change. I’ve deleted the existing .classpath file, did Gradle -> Refresh Gradle Project on the subproject and the parent project. I even changed the removal to clear all entries with entries.clear(), but the .classpath file still has the same entries in it. If I run ./gradlew eclipseClasspath the resulting file removes the src/main/java entry. How can I get Buildship to remove this entry from its classpath?

  • Buildship 2.0
  • Eclipse Neon 4.6.2
  • Gradle 2.14.1

(Stefan Oehme) #2

This is only supported by Buildship with Gradle 3.0+