title: Maven top-level exception in Android project
body: <p>I have an Android project which I want to handle with Maven. I am pretty new to Maven so every step I have another bug to solve. I need to add this is pretty huge project with a lot of libraries. 
  Here is an error : </p>
  
  <pre><code>[
  
  INFO] warning: Ignoring InnerClasses attribute for an anonymous inner class
  [INFO] (org.apache.commons.logging.LogFactory$6) that doesn't come with an
  [INFO] associated EnclosingMethod attribute. This class was probably produced by a
  [INFO] compiler that did not target the modern .class file format. The recommended
  [INFO] solution is to recompile the class from source, using an up-to-date compiler
  [INFO] and without specifying any "-target" type options. The consequence of ignoring
  [INFO] this warning is that reflective operations on this class will incorrectly
  [INFO] indicate that it is *not* an inner class.
  [INFO] 
  [INFO] UNEXPECTED TOP-LEVEL EXCEPTION:
  [INFO] java.lang.IllegalArgumentException: already added: Lorg/apache/http/annotation/NotThreadSafe;
  [INFO]  at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
  [INFO]  at com.android.dx.dex.file.DexFile.add(DexFile.java:163)
  [INFO]  at com.android.dx.command.dexer.Main.processClass(Main.java:490)
  [INFO]  at com.android.dx.command.dexer.Main.processFileBytes(Main.java:459)
  [INFO]  at com.android.dx.command.dexer.Main.access$400(Main.java:67)
  [INFO]  at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:398)
  [INFO]  at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245)
  [INFO]  at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131)
  [INFO]  at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109)
  [INFO]  at com.android.dx.command.dexer.Main.processOne(Main.java:422)
  [INFO]  at com.android.dx.command.dexer.Main.processAllFiles(Main.java:333)
  [INFO]  at com.android.dx.command.dexer.Main.run(Main.java:209)
  [INFO]  at com.android.dx.command.dexer.Main.main(Main.java:174)
  [INFO]  at com.android.dx.command.Main.main(Main.java:91)
  [INFO] 
  [INFO] UNEXPECTED TOP-LEVEL EXCEPTION:
  [INFO] java.lang.IllegalArgumentException: already added: Lcom/google/inject/AbstractModule;
  [INFO]  at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
  [INFO]  at com.android.dx.dex.file.DexFile.add(DexFile.java:163)
  [INFO]  at com.android.dx.command.dexer.Main.processClass(Main.java:490)
  [INFO]  at com.android.dx.command.dexer.Main.processFileBytes(Main.java:459)
  [INFO]  at com.android.dx.command.dexer.Main.access$400(Main.java:67)
  [INFO]  at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:398)
  [INFO]  at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245)
  [INFO]  at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131)
  [INFO]  at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109)
  [INFO]  at com.android.dx.command.dexer.Main.processOne(Main.java:422)
  [INFO]  at com.android.dx.command.dexer.Main.processAllFiles(Main.java:333)
  [INFO]  at com.android.dx.command.dexer.Main.run(Main.java:209)
  [INFO]  at com.android.dx.command.dexer.Main.main(Main.java:174)
  [INFO]  at com.android.dx.command.Main.main(Main.java:91)
  </code></pre>
  
  <p>and my pom.xml, some of the libraries come from Maven Central and some of them I added localy to my Maven repo. </p>
  
  <pre><code>&lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.android&lt;/groupId&gt;
          &lt;artifactId&gt;android&lt;/artifactId&gt;
          &lt;version&gt;4.1.1.4&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
  
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.android&lt;/groupId&gt;
          &lt;artifactId&gt;support-v4&lt;/artifactId&gt;
          &lt;version&gt;r7&lt;/version&gt;
  
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-io&lt;/groupId&gt;
          &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
          &lt;version&gt;20030203.000550&lt;/version&gt;
  
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.code.gson&lt;/groupId&gt;
          &lt;artifactId&gt;gson&lt;/artifactId&gt;
          &lt;version&gt;2.2.4&lt;/version&gt;
  
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
          &lt;artifactId&gt;guava&lt;/artifactId&gt;
          &lt;version&gt;12.0.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.inject&lt;/groupId&gt;
          &lt;artifactId&gt;guice&lt;/artifactId&gt;
          &lt;version&gt;2.0-no_aop&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;http-client&lt;/groupId&gt;
          &lt;artifactId&gt;http-client-android&lt;/artifactId&gt;
          &lt;version&gt;1.1.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
          &lt;artifactId&gt;httpmime&lt;/artifactId&gt;
          &lt;version&gt;4.2.5&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;local.admobsdk&lt;/groupId&gt;
          &lt;artifactId&gt;admobsdk&lt;/artifactId&gt;
          &lt;version&gt;6.4.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;local.kicalls&lt;/groupId&gt;
          &lt;artifactId&gt;kicalls&lt;/artifactId&gt;
          &lt;version&gt;1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.protobuf&lt;/groupId&gt;
          &lt;artifactId&gt;protobuf-java&lt;/artifactId&gt;
          &lt;version&gt;2.4.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.roboguice&lt;/groupId&gt;
          &lt;artifactId&gt;roboguice&lt;/artifactId&gt;
          &lt;version&gt;2.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;oauth.signpost&lt;/groupId&gt;
          &lt;artifactId&gt;signpost-commonshttp4&lt;/artifactId&gt;
          &lt;version&gt;1.2.1.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.twitter4j&lt;/groupId&gt;
          &lt;artifactId&gt;twitter4j-core&lt;/artifactId&gt;
          &lt;version&gt;2.1.11&lt;/version&gt;
      &lt;/dependency&gt;
  
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.1&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;encoding&gt;UTF-8&lt;/encoding&gt;
                  &lt;source&gt;1.6&lt;/source&gt;
                  &lt;target&gt;1.6&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;com.jayway.maven.plugins.android.generation2&lt;/groupId&gt;
              &lt;artifactId&gt;android-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.6.1&lt;/version&gt;
              &lt;configuration&gt;
  
                  &lt;androidManifestFile&gt;${project.basedir}/AndroidManifest.xml&lt;/androidManifestFile&gt;
                  &lt;assetsDirectory&gt;${project.basedir}/assets&lt;/assetsDirectory&gt;
                  &lt;resourceDirectory&gt;${project.basedir}/res&lt;/resourceDirectory&gt;
                  &lt;nativeLibrariesDirectory&gt;${project.basedir}/src/main/native&lt;/nativeLibrariesDirectory&gt;
                  &lt;sdk&gt;
                      &lt;path&gt;/Users/asd/Desktop/sdk&lt;/path&gt;
                      &lt;platform&gt;14&lt;/platform&gt;
                  &lt;/sdk&gt;
                  &lt;deleteConflictingFiles&gt;true&lt;/deleteConflictingFiles&gt;
                  &lt;undeployBeforeDeploy&gt;true&lt;/undeployBeforeDeploy&gt;
                  &lt;attachSources&gt;false&lt;/attachSources&gt;
                  &lt;proguard&gt;
                      &lt;skip&gt;true&lt;/skip&gt;
                  &lt;/proguard&gt;
  
              &lt;/configuration&gt;
              &lt;extensions&gt;true&lt;/extensions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>They say on the internet, that I should add exclusion to these two classes who produce this top-level exception, but have no clue what exclusion I shoud add.</p>