[英]Gradle integration with Eclipse
我已經在Ubuntu 14.04上安裝了gradle 2.0,並且希望使用Gradle運行一個Web應用程序,但是當我在Eclipse Luna上構建Gradle項目時(我已經為Eclipse 4.4安裝了Gradle集成插件),然后鍵入“ gradle task在終端上,它不會顯示運行servlet的任務“ jettyEclipse”。
這是我的build.gradle :
buildscript {
repositories {
jcenter()
}
dependencies {
classpath (group: 'com.sahlbach.gradle', name: 'gradle-jetty-eclipse-plugin', version: '1.9.2')
}
}
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'jettyEclipse'
apply plugin: 'eclipse'
apply plugin: 'eclipse-wtp'
repositories {
mavenCentral()
}
dependencies {
providedCompile 'javax.servlet:javax.servlet-api:3.0.1'
}
這里是編譯輸出:
[sts] -----------------------------------------------------
[sts] Starting Gradle build for the following tasks:
[sts] :cleanEclipse
[sts] :eclipse
[sts] -----------------------------------------------------
:cleanEclipseClasspath
:cleanEclipseJdt
:cleanEclipseProject
:cleanEclipseWtpComponent
:cleanEclipseWtpFacet
:cleanEclipseWtp
:cleanEclipse
:eclipseClasspath
:eclipseJdt
:eclipseProject
:eclipseWtpComponent
:eclipseWtpFacet
:eclipseWtp
:eclipse
BUILD SUCCESSFUL
Total time: 1.14 secs
[sts] -----------------------------------------------------
[sts] Build finished succesfully!
[sts] Time taken: 0 min, 1 sec
[sts] -----------------------------------------------------
這是我的“漸變任務”輸出:
:tasks
------------------------------------------------------------
All tasks runnable from root project
------------------------------------------------------------
Build Setup tasks
-----------------
init - Initializes a new Gradle build. [incubating]
wrapper - Generates Gradle wrapper files. [incubating]
Help tasks
----------
dependencies - Displays all dependencies declared in root project 'me'.
dependencyInsight - Displays the insight into a specific dependency in root project 'me'.
help - Displays a help message
projects - Displays the sub-projects of root project 'me'.
properties - Displays the properties of root project 'me'.
tasks - Displays the tasks runnable from root project 'me'.
To see all tasks and more detail, run with --all.
BUILD SUCCESSFUL
Total time: 3.35 secs
我也嘗試過1.9和2.1 gradle版本。
誰能幫我?
我正在我的主目錄中執行gradle tasks
,而不是在項目目錄中(我具有build.gradle
。)。Peter感謝您的幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.