title: How to access PlayRunHooks trait and PlayKeys from inside a sbt plugin
body: <p>I want to include the workflow of the Ember CLI into a Play! application. I decided to write an <code>sbt</code> plugin that, when enabled in the play applications build, will do a few things:</p>
  
  <ol>
  <li>Add a task to run "ember new" to create the UI project in a sub directory.</li>
  <li>Add a <code>PlayRunHook</code> so that when <code>run</code> is executed from the activator shell, it also starts the node server serving the EmberJS application by setting the proper proxy such that the api calls are proxied to the Play! application.</li>
  <li>When the package is called, it also packages the EmberJS application.</li>
  <li>Properly sets up the UI Assets to include the EmberJS application.</li>
  </ol>
  
  <p>The problem is I am not able to find out how to add a dependency so that I can use the <code>PlayRunHook</code> trait and <code>PlayKeys</code> in my sbt plugin.</p>
  
  <p>I want to use the plugin route because in the future I may have more services that will have the same kind of workflow.</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I could not find out a way to create this plugin as I was not able to access <code>PlayRunHook</code> from that plugin. But, I have implemented what I wanted as a seed project. Link: <a href="https://github.com/dipayanb/play-ember-seed" rel="nofollow">https://github.com/dipayanb/play-ember-seed</a></p>
  
  <p>While writing the sbt plugin I was not able to write a class similar to <a href="https://github.com/dipayanb/play-ember-seed/blob/master/project/EmberRunner.scala" rel="nofollow">https://github.com/dipayanb/play-ember-seed/blob/master/project/EmberRunner.scala</a> as I was not able to compile the code from inside the plugin.</p>