title: Maven configuration for using Dagger 2 in a mixed Java/Kotlin project
body: <p>What is the recommended Maven setup for using <a href="https://github.com/google/dagger" rel="noreferrer">Dagger 2</a> in a mixed Java/Kotlin project?</p>
  
  <p>I found a sample project which uses Gradle: <a href="https://github.com/damianpetla/kotlin-dagger-example" rel="noreferrer">https://github.com/damianpetla/kotlin-dagger-example</a>
  Something similar with Maven would be very helpful.</p>
  
  <hr>
  
  <p><strong>UPDATE: What have I tried?</strong></p>
  
  <p>I used the Kotlin configuration from <a href="http://kotlinlang.org/docs/reference/using-maven.html" rel="noreferrer">kotlinlang.org/docs/reference/using-maven.html</a>
  and the Dagger configuration from <a href="http://google.github.io/dagger" rel="noreferrer">google.github.io/dagger</a>.
  I also used the <a href="http://www.mojohaus.org/build-helper-maven-plugin/" rel="noreferrer">build-helper-maven-plugin</a> plugin to integrate the annotation processing in IDEA.</p>
  
  <p>My main problem was that I run into compilation cycles. My configuration mixed the compilation of Kotlin and calling the annotation processor, which generates Dagger2 classes. I unsystematically tried to separate both phases but lacked the deeper Maven understanding to get it working.</p>