浏览代码

Configure Eclipse wtp to use the same context root as jetty

Rob Winch 14 年之前
父节点
当前提交
6983b166d8
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      build.gradle

+ 5 - 0
build.gradle

@@ -105,6 +105,11 @@ configure(javaProjects) {
             }
         }
     }
+    tasks.withType(org.gradle.plugins.eclipse.EclipseWtpComponent) {
+        whenConfigured { wtpComponent ->
+            wtpComponent.contextPath = project.tasks.findByName('jettyRun')?.contextPath?.replaceFirst('/','')
+        }
+    }
 }
 
 ideaModule {