|
|
|
|
@ -12,7 +12,7 @@ configure(javaProjects) {
@@ -12,7 +12,7 @@ configure(javaProjects) {
|
|
|
|
|
testOutputDir = "$rootProject.projectDir/intellij/testOut" as File |
|
|
|
|
whenConfigured { module -> |
|
|
|
|
def allClasses = module.dependencies.findAll() { dep -> |
|
|
|
|
if (dep instanceof org.gradle.plugins.idea.model.ModuleLibrary |
|
|
|
|
if (dep instanceof org.gradle.plugins.ide.idea.model.ModuleLibrary |
|
|
|
|
&& dep.classes.find { path -> |
|
|
|
|
path.url.matches('.*jcl-over-slf4j.*') || |
|
|
|
|
path.url.matches('.*servlet-api.*') || |
|
|
|
|
@ -32,7 +32,7 @@ configure(javaProjects) {
@@ -32,7 +32,7 @@ configure(javaProjects) {
|
|
|
|
|
eclipseClasspath.whenConfigured { classpath -> |
|
|
|
|
def includeDeps = project.configurations.getByName('runtime')?.collect { f-> f.absolutePath } as Set |
|
|
|
|
classpath.entries.each { cp -> |
|
|
|
|
if(cp instanceof org.gradle.plugins.eclipse.model.Library) { |
|
|
|
|
if(cp instanceof org.gradle.plugins.ide.eclipse.model.Library) { |
|
|
|
|
def include = includeDeps.contains(cp.path) |
|
|
|
|
def attr = 'org.eclipse.jst.component.dependency' |
|
|
|
|
if(include && project.hasProperty('war')) { |
|
|
|
|
@ -49,14 +49,14 @@ configure(javaProjects) {
@@ -49,14 +49,14 @@ configure(javaProjects) {
|
|
|
|
|
// GRADLE-1426 (part b) |
|
|
|
|
project.plugins.withType(org.gradle.api.plugins.WarPlugin.class).all { |
|
|
|
|
eclipseWtpComponent.whenConfigured { wtpComp -> |
|
|
|
|
wtpComp.wbModuleEntries.findAll { it instanceof org.gradle.plugins.eclipse.model.WbDependentModule }.each { e -> |
|
|
|
|
wtpComp.wbModuleEntries.findAll { it instanceof org.gradle.plugins.ide.eclipse.model.WbDependentModule }.each { e -> |
|
|
|
|
if(!e.handle.startsWith('module:/resource/')) { |
|
|
|
|
wtpComp.wbModuleEntries.remove(e) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
tasks.withType(org.gradle.plugins.eclipse.EclipseWtpComponent) { |
|
|
|
|
tasks.withType(org.gradle.plugins.ide.eclipse.GenerateEclipseWtpComponent) { |
|
|
|
|
whenConfigured { wtpComponent -> |
|
|
|
|
wtpComponent.contextPath = project.tasks.findByName('jettyRun')?.contextPath?.replaceFirst('/','') |
|
|
|
|
} |
|
|
|
|
|