diff --git a/gradle/ide.gradle b/gradle/ide.gradle index e7844180b1..469733d7a5 100644 --- a/gradle/ide.gradle +++ b/gradle/ide.gradle @@ -13,7 +13,7 @@ eclipse.jdt { // Replace classpath entries with project dependencies (GRADLE-1116) // http://issues.gradle.org/browse/GRADLE-1116 eclipse.classpath.file.whenMerged { classpath -> - def regexp = /.*?\/([^\/]+)\/build\/[^\/]+\/(?:main|test)/ // only match those that end in main or test (avoids removing necessary entries like build/classes/jaxb) + def regexp = /.*?\/([^\/]+)\/build\/([^\/]+\/)+(?:main|test)/ // only match those that end in main or test (avoids removing necessary entries like build/classes/jaxb) def projectOutputDependencies = classpath.entries.findAll { entry -> entry.path =~ regexp } projectOutputDependencies.each { entry -> def matcher = (entry.path =~ regexp) @@ -21,7 +21,7 @@ eclipse.classpath.file.whenMerged { classpath -> def projectName = matcher[0][1] def path = "/${projectName}" if(!classpath.entries.find { e -> e instanceof ProjectDependency && e.path == path }) { - def dependency = new ProjectDependency(path, project(":${projectName}").path) + def dependency = new ProjectDependency(path) dependency.exported = true classpath.entries.add(dependency) }