title: Problems compiling routes after migrating to Play 2.1
body: <p>After migrating to Play-2.1 I stuck into problem that routes compiler stopped working for my routes file. It's been completely fine with Play-2.0.4, but now I'm getting the build error and can't find any workaround for it.</p>
  
  <p>In my project I'm using cake pattern, so controller actions are visible not through <code>&lt;package&gt;.&lt;controller class&gt;.&lt;action&gt;</code>, but through <code>&lt;package&gt;.&lt;component registry&gt;.&lt;controller instance&gt;.&lt;action&gt;</code>. New Play routes compiler is using all action path components except for the last two to form package name that will be used in managed sources (as far as I can get code in <a href="https://github.com/playframework/Play20/blob/2.1.0/framework/src/routes-compiler/src/main/scala/play/router/RoutesCompiler.scala" rel="nofollow">https://github.com/playframework/Play20/blob/2.1.0/framework/src/routes-compiler/src/main/scala/play/router/RoutesCompiler.scala</a>). In my case it leads to situation when <code>&lt;package&gt;.&lt;component registry&gt;</code> is chosen as package name, which results in error during build:</p>
  
  <pre><code>[error] server/target/scala-2.10/src_managed/main/com/grumpycats/mmmtg/componentsRegistry/routes.java:5: componentsRegistry is already defined as object componentsRegistry
  [error] package com.grumpycats.mmmtg.componentsRegistry;
  </code></pre>
  
  <p>I made the sample project to demonstrate this problem: <a href="https://github.com/rmihael/play-2.1-routes-problem" rel="nofollow">https://github.com/rmihael/play-2.1-routes-problem</a></p>
  
  <p>Is it possible to workaround this problem somehow without dropping cake pattern for controllers? It's the pity that I can't proceed with Play 2.1 due to this problem.</p>