title: android-maven-plugin - How to set up apkMetaIncludes?
body: <p><a href="http://maven-android-plugin-m2site.googlecode.com/svn/apk-mojo.html#apkMetaIncludes" rel="nofollow">http://maven-android-plugin-m2site.googlecode.com/svn/apk-mojo.html#apkMetaIncludes</a></p>
  
  <blockquote>
    <p>Pattern for additional META-INF resources to be packaged into the apk.
    The APK builder filters these resources and doesn't include them into
    the apk. This leads to bad behaviour of dependent libraries relying on
    these resources, for instance service discovery doesn't work. By
    specifying this pattern, the android plugin adds these resources to
    the final apk. The pattern is relative to META-INF, i.e. one must use:</p>
  </blockquote>
  
  <pre><code>&lt;apkMetaIncludes&gt;
      &lt;metaInclude&gt;services/**&lt;/metaInclude&gt;
  &lt;/apkMetaIncludes&gt;
  </code></pre>
  
  <p>The META-INF folder is under src folder</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;br.com.alpha9.teste&lt;/groupId&gt;
      &lt;artifactId&gt;testemvn&lt;/artifactId&gt;
      &lt;version&gt;1.0.0&lt;/version&gt;
      &lt;packaging&gt;apk&lt;/packaging&gt;
      &lt;name&gt;testemvn&lt;/name&gt;
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.3.2&lt;/version&gt;
                  &lt;configuration&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.5.0&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;/Applications/android-sdk-macosx&lt;/path&gt;
                          &lt;platform&gt;13&lt;/platform&gt;
                      &lt;/sdk&gt;
                      &lt;undeployBeforeDeploy&gt;true&lt;/undeployBeforeDeploy&gt;
                      &lt;apkMetaIncludes&gt;
                          &lt;metaInclude&gt;services/**&lt;/metaInclude&gt;
                      &lt;/apkMetaIncludes&gt;
                  &lt;/configuration&gt;
                  &lt;extensions&gt;true&lt;/extensions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
      &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.0.1.2&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>At the end, my APK has no services folder!</p>