/ / Gradle-Integration mit Eclipse - Java, Eclipse, Gradle, Build.gradle, Gradle-Eclipse

Gradle Integration mit Eclipse - Java, Eclipse, Gradle, Build.Gradle, Gradle-Eclipse

Ich habe gradle 2.0 auf Ubuntu 14 installiert.04 und ich möchte eine kleine Webanwendung mit Gradle ausführen, aber wenn ich das Gradle-Projekt auf Eclipse Luna baue (ich habe das Gradle Integrations-Plugin für Eclipse 4.4 installiert), tippe ich "Gradle-Aufgaben" auf ein Terminal Zeigen Sie die Task "jettyEclipse" an, um das Servlet auszuführen.

Hier mein 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"
}

Hier die Zusammenstellungsausgabe:

[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] -----------------------------------------------------

Und hier meine Ausgabe "Gradle Aufgaben":

: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

Ich habe auch mit 1.9 und 2.1 Gradle-Versionen versucht.

Kann mir jemand helfen?

Antworten:

0 für die Antwort № 1

Ich habe gerade ausgeführt gradle tasks in meinem Heimatverzeichnis, nicht im Projektverzeichnis (wo ich das habe build.gradle. Peter, danke für deine Hilfe.