Add Android Support Jars to maven repository

  1. Open the sdk folder
  2. Then open the folder extras/android/m2repository
  3. Then open com/android/support/support-v4/21.0.2/support-v4-21.0.2.aar and extract classes.jar
  4. Then open com/android/support/appcompat-v7/21.0.2/appcompat-v7-21.0.2.aar and extract classes.jar
  5. Open the console

    1. mvn install:install-file -Dfile=”./com/android/support/support-v4/21.0.2/classes.jar”/ -DpomFile=”./com/android/support/support-v4/21.0.2/support-v4-21.0.2.pom”/ -Dpackaging=”jar”

    2. mvn install:install-file -Dfile=”./com/android/support/appcompat-v7/21.0.2/classes.jar”/ -DpomFile=”./com/android/support/appcompat-v7/21.0.2/appcompat-v7-21.0.2.pom”/ -Dpackaging=”jar”

    3. mvn install:install-file -Dfile=”./com/android/support/appcompat-v7/21.0.2/appcompat-v7-21.0.2.aar”/ -DpomFile=”./com/android/support/appcompat-v7/21.0.2/appcompat-v7-21.0.2.pom”/ -Dpackaging=”akplib”

Now you can add the maven dependencies:

<dependency>
    <groupId>com.android.support</groupId>
    <artifactId>appcompat-v7</artifactId>
    <version>21.0.2</version>
    <type>jar</type>
</dependency>

<dependency>
    <groupId>com.android.support</groupId>
    <artifactId>support-v4</artifactId>
    <version>21.0.2</version>
</dependency>

and use the support library in your maven project.