title: Start elasticsearch within gradle build for integration tests
body: <p>Is there a way to start elasticsearch within a gradle build before running integration tests and afterwards stop elasticsearch?</p>
  
  <p>My approach so far is the following, but this blocks the further execution of the gradle build.</p>
  
  <pre><code>task runES(type: JavaExec) {
      main = 'org.elasticsearch.bootstrap.Elasticsearch'
      classpath = sourceSets.main.runtimeClasspath
      systemProperties = ["es.path.home":"$buildDir/elastichome",
                          "es.path.data":"$buildDir/elastichome/data"]
  }
  </code></pre>