I've installed gradle 2.0 on Ubuntu 14.04, and I want to run a little Web Application with Gradle, but when I build the Gradle project on Eclipse Luna (I've installed Gradle integration plugin for Eclipse 4.4) and I type "gradle tasks" on a terminal it doesn't show the task "jettyEclipse" to run the servlet.
Here my 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'
}
Here the compilation output:
[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] -----------------------------------------------------
And here my "gradle tasks" output:
: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
I also have try with 1.9 and 2.1 gradle versions.
Can anyone help me?
I was executing gradle tasks
in my home directory, not in the project directory (where I have the build.gradle
. Peter thanks for your help.