title: How to run Jetty with Gradle
body: <p>I have a Gradle project, and I'm trying to run it with it Jetty. 
  My <code>build.gradle</code> file looks like following.</p>
  
  <p><strong>build.gradle</strong></p>
  
  <pre><code>apply plugin: 'java'
  apply plugin: 'war'
  apply plugin: 'jetty'
  
  [jettyRun, jettyRunWar]*.httpPort = 8080
  [jettyRun, jettyRunWar]*.contextPath = ''
  [jettyRun, jettyRunWar]*.daemon = true
  [jettyRun, jettyRunWar, jettyStop]*.stopPort = 8081
  [jettyRun, jettyRunWar, jettyStop]*.stopKey = 'stop'
  
  repositories {
      mavenCentral()
  }
  
  sourceCompatibility = 1.8
  targetCompatibility = 1.8
  
  sourceSets {
      test {
          java {
              srcDirs = ['src/test/java']
          }
      }
  }
  
  dependencies {
      compile 'org.glassfish.jersey.containers:jersey-container-servlet:2.14'
      compile 'org.glassfish.jersey.media:jersey-media-json-jackson:2.14'
      compile 'com.google.guava:guava:14.0.1'
      testCompile 'junit:junit:4.12'
      testCompile 'org.hamcrest:hamcrest-all:1.3'
      testCompile 'org.mockito:mockito-all:1.10.19'
      testCompile 'org.eclipse.jetty:jetty-server:9.4.7.v20170914'
      testCompile 'org.eclipse.jetty:jetty-webapp:9.4.7.v20170914'
  }
  </code></pre>
  
  <p>I'm trying to run this project from the command line, and the commands I'm using are:</p>
  
  <ol>
  <li><p><code>./gradlew</code> which should build the project, and outputs the following:</p>
  
  <p>The Jetty plugin has been deprecated and is scheduled to be removed in Gradle 4.0. Consider using the Gretty (<a href="https://github.com/akhikhl/gretty" rel="nofollow noreferrer">https://github.com/akhikhl/gretty</a>) plugin instead.
          at build_6xw4u3prr68h02k136x2vqowd.run(/myproject/build.gradle:3)
  :help</p>
  
  <p>Welcome to Gradle 3.2.1.</p></li>
  <li><p><code>gradle jettyRun</code> which failed with the statement <strong>Plugin with id 'jetty' not found.</strong></p></li>
  </ol>
  
  <p>So the question is, how do I run such a project? Note that I didn't write this project, I just need to run it on my local machine.</p>