I'm using Maven with my Android project, along with the android-maven-plugin. In my project pom.xml file I declare the dependency like so:
<dependency>
<groupId>com.viewpagerindicator</groupId>
<artifactId>library</artifactId>
<version>2.4.1</version>
<type>apklib</type>
</dependency>
ViewPagerIndicator has a dependency on Android 4.1.1.4, which is on Maven Central here. However, I don't build with Android 4.1.1.4, I build on 4.2.2 r2, which is declared like so:
<dependency>
<groupId>android</groupId>
<artifactId>android</artifactId>
<version>4.2.2_r2</version>
</dependency>
This artifact is NOT on Maven Central, I'm using the maven-android-sdk-deployer to push Android artifacts into my repo.
If I open up my terminal and build with maven, there's no issue. The issue is when I import my project into IntelliJ and try to build. The module settings (correctly) complain that path to the Android 4.1.1.4 dependency in the ViewPagerIndicator apklib module is broken.
I checked my .m2/repository folder for the Android 4.1.1.4 jar and there's not even a folder for it, which means Maven never downloaded it. I'm guessing it has something to do with the way the maven-android-plugin works when you build with Maven, vs how IntelliJ builds.
I know I can just grab the jar and deploy it myself by hand, but I'm looking for a better solution so new members on my team only need to grab the source code and do nothing else to build the project. I already set up Nexus for the team, so we don't have to keep manually deploying third party jars, and running the sdk deployer on everyone's machine. I'd like to be able to just hand a new dev the source and they can just run with it.