title: How to add WebJars to my Play app?
body: <p>In order to use WebJars in my Play app I've added the following route</p>
  
  <pre><code>GET     /webjars/*file              controllers.WebJarAssets.at(file)
  </code></pre>
  
  <p>In my scala template I've added the following lines:</p>
  
  <pre><code>&lt;link rel='stylesheet' href='@routes.WebJarAssets.at(WebJarAssets.locate("css/bootstrap.min.css"))'&gt;
  &lt;link rel='stylesheet' href='@routes.WebJarAssets.at(WebJarAssets.locate("css/bootstrap-theme.min.css"))'&gt;
  </code></pre>
  
  <p>When I open the app, the css files are perfectly loaded. But as soon as I run <code>activator eclipse</code>, I get the following compilation error:</p>
  
  <pre><code>[info] Compiling 4 Scala sources and 2 Java sources to /Users/d135-1r43/play/blog/target/scala-2.11/classes...
  [error] /Users/d135-1r43/play/blog/conf/routes:10: object WebJarAssets is not a member of package controllers
  [error] GET     /webjars/*file              controllers.WebJarAssets.at(file)
  [error] /Users/d135-1r43/play/blog/conf/routes:10: object WebJarAssets is not a member of package controllers
  [error] GET     /webjars/*file              controllers.WebJarAssets.at(file)
  [error] /Users/d135-1r43/play/blog/app/views/main.scala.html:8: not found: value WebJarAssets
  [error]         &lt;link rel='stylesheet' href='@routes.WebJarAssets.at(WebJarAssets.locate("css/bootstrap.min.css"))'&gt;
  [error]                                                              ^
  [error] /Users/d135-1r43/play/blog/app/views/main.scala.html:9: not found: value WebJarAssets
  [error]         &lt;link rel='stylesheet' href='@routes.WebJarAssets.at(WebJarAssets.locate("css/bootstrap-theme.min.css"))'&gt;
  [error]                                                              ^
  [error] four errors found
  [error] (compile:compile) Compilation failed
  [error] Could not create Eclipse project files:
  [error] Error evaluating task 'dependencyClasspath': error
  </code></pre>
  
  <p>Any idea what happened here? Do I need to add something to my classpath?</p>