title: Mortar / Flow samples NoClassDefFoundError: com.example.mortar.MortarDemoApplication$1
body: <p>I'm having a really hard time getting the Mortar/Flow examples working via Eclipse &amp; Maven.</p>
  
  <p>My <code>.apt_generated</code> folder is created and there are numerous generated classes in that directory but <code>MortarDemoApplication$1</code> is not generated for some reason.</p>
  
  <p>I've gone through numerous examples and other threads troubleshooting this problem, but can't seem to find any solution that works.</p>
  
  <p>I have Annotation Processing enabled in Eclipse, and I've configured the Factory path to include dagger, dagger-compiler, and javawriter. I've read that this should not be necessary as the Eclipse m2e-apt plugin is supposed to handle this, but that seems to be the only way that I could get the <code>.apt_generated</code> sources to be generated.</p>
  
  <p>Is there a definitive set of instructions somewhere that perhaps I'm missing?</p>
  
  <p><strong>UPDATE 1</strong></p>
  
  <p>Building and running with just Maven from the command line (no Eclipse) presents its own set of issues.</p>
  
  <p>First, the latest Maven 3.2.5 throws the following error when attempting to run <code>mvn install</code> from the mortar directory:</p>
  
  <pre><code>  Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/aether/spi/connector/Transfer$State
      at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:608)
      at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.ClassNotFoundException: org.eclipse.aether.spi.connector.Transfer$State
      at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
      at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
      at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
      at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
      ... 5 more
  </code></pre>
  
  <p>After switching back to Maven 3.1.1 <code>mvn deploy</code> works, but the mortar-helloworld app crashes when running it via <code>mvn android:run</code> with the following error via logcat:</p>
  
  <pre><code>D/AndroidRuntime( 2820): 
  D/AndroidRuntime( 2820): &gt;&gt;&gt;&gt;&gt;&gt; AndroidRuntime START com.android.internal.os.RuntimeInit &lt;&lt;&lt;&lt;&lt;&lt;
  D/AndroidRuntime( 2820): CheckJNI is ON
  E/memtrack( 2820): Couldn't load memtrack module (No such file or directory)
  E/android.os.Debug( 2820): failed to load memtrack module: -2
  D/AndroidRuntime( 2820): Calling main entry com.android.commands.am.Am
  D/AndroidRuntime( 2820): Shutting down VM
  I/ActivityManager( 1315): Start proc com.example.hellomortar for activity com.example.hellomortar/.HelloActivity: pid=2831 uid=10057 gids={50057, 9997} abi=x86_64
  E/art     ( 2831): Failed sending reply to debugger: Broken pipe
  I/art     ( 2831): Debugger is no longer active
  D/AndroidRuntime( 2831): Shutting down VM
  E/AndroidRuntime( 2831): FATAL EXCEPTION: main
  E/AndroidRuntime( 2831): Process: com.example.hellomortar, PID: 2831
  E/AndroidRuntime( 2831): java.lang.NoClassDefFoundError: Failed resolution of: Lmortar/Mortar;
  E/AndroidRuntime( 2831):    at com.example.hellomortar.HelloApplication.onCreate(HelloApplication.java:29)
  E/AndroidRuntime( 2831):    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1011)
  E/AndroidRuntime( 2831):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4518)
  E/AndroidRuntime( 2831):    at android.app.ActivityThread.access$1500(ActivityThread.java:144)
  E/AndroidRuntime( 2831):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)
  E/AndroidRuntime( 2831):    at android.os.Handler.dispatchMessage(Handler.java:102)
  E/AndroidRuntime( 2831):    at android.os.Looper.loop(Looper.java:135)
  E/AndroidRuntime( 2831):    at android.app.ActivityThread.main(ActivityThread.java:5221)
  E/AndroidRuntime( 2831):    at java.lang.reflect.Method.invoke(Native Method)
  E/AndroidRuntime( 2831):    at java.lang.reflect.Method.invoke(Method.java:372)
  E/AndroidRuntime( 2831):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
  E/AndroidRuntime( 2831):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
  E/AndroidRuntime( 2831): Caused by: java.lang.ClassNotFoundException: Didn't find class "mortar.Mortar" on path: DexPathList[[zip file "/data/app/com.example.hellomortar-2/base.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
  E/AndroidRuntime( 2831):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
  E/AndroidRuntime( 2831):    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
  E/AndroidRuntime( 2831):    at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
  E/AndroidRuntime( 2831):    ... 12 more
  E/AndroidRuntime( 2831):    Suppressed: java.lang.ClassNotFoundException: mortar.Mortar
  E/AndroidRuntime( 2831):        at java.lang.Class.classForName(Native Method)
  E/AndroidRuntime( 2831):        at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
  E/AndroidRuntime( 2831):        at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
  E/AndroidRuntime( 2831):        at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
  E/AndroidRuntime( 2831):        ... 13 more
  E/AndroidRuntime( 2831):    Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
  W/ActivityManager( 1315):   Force finishing activity com.example.hellomortar/.HelloActivity
  D/gralloc (  948): Registering a buffer in the process that created it. This may cause memory ordering problems.
  E/libEGL  (  948): called unimplemented OpenGL ES API
  E/SurfaceFlinger(  948): glCheckFramebufferStatusOES error 1332776638
  E/SurfaceFlinger(  948): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
  W/WindowManager( 1315): Screenshot failure taking screenshot for (800x1280) to layer 22010
  E/ActivityManager( 1315): Invalid thumbnail dimensions: 420x420
  W/ActivityManager( 1315): Activity pause timeout for ActivityRecord{515bd0e u0 com.example.hellomortar/.HelloActivity t20 f}
  W/ActivityManager( 1315): Activity destroy timeout for ActivityRecord{515bd0e u0 com.example.hellomortar/.HelloActivity t20 f}
  D/TaskPersister( 1315): removeObsoleteFile: deleting file=20_task.xml
  W/BatteryStatsImpl( 1315): Couldn't get kernel wake lock stats
  I/Process ( 2831): Sending signal. PID: 2831 SIG: 9
  </code></pre>