Skip to content
Daniel Dobalian edited this page Feb 10, 2018 · 1 revision

Setup Maven for ADAL Android

Some of the Android libraries are not at the maven repo, so you need to have the Android Maven SDK Deployer installed and configured. You can read at the Android Maven SDK Deployer GitHub in depth install guide.

Prerequisites

Before you run the SDK Deployer, there are a few prerequisites:

  1. You should have installed all packages required in the Android SDK, especially for API level 19 and above. This will be required in order to run the Maven commands below.

  2. You will need to have Maven installed and in your $PATH so that you can use it from the command line.

  3. You will need to ensure you have $ANDROID_HOME set in your CLASSPATH and pointed to your SDK path.

Example:

export ANDROID_HOME=/Applications/adt-bundle-mac-x86_64-20140702/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_HOME/build-tools:$ANDROID_HOME/platforms:$ANDROID_HOME/extras

Install Maven Android SDK Installer

Once Prerequisites are complete, run the following from your command line:

$ git clone https://github.com/mosabua/maven-android-sdk-deployer.git
$ cd maven-android-sdk-deployer/platforms/android-19
$ mvn clean install
$ cd ../../extras/compatibility-v4
$ mvn clean install -Dextras.compatibility.v4.groupid=com.android.support \
        -Dextras.compatibility.v4.artifactid=support-v4

Maven has android-19 and support-v4 as dependencies in your local m2 repo.

Install ADAL with mvn cmd

You can clone and install from cmd line. This requires that you previously have setup the Maven Android environment above:

git clone https://github.com/AzureAD/azure-activedirectory-library-for-android
cd azure-activedirectory-library-for-android
mvn clean install
Clone this wiki locally