jpardogo / PagerSlidingTabStrip

An interactive indicator to navigate between the different pages of a ViewPager
2.19k stars 353 forks source link

Add <type>aar</type> to support-v4 dependency declaration in library pom #37

Closed mstevens83 closed 9 years ago

mstevens83 commented 9 years ago

The pom file of the om.jpardogo.materialtabstrip library (as published to Maven central: http://repo1.maven.org/maven2/com/jpardogo/materialtabstrip/library/1.0.6/library-1.0.6.pom) contains this dependency declaration

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

This causes a problem when a project which depends on the library is being built using maven (rather than gradle, which I assume doesn't have this problem). Because recent versions of support-v4 are packaged as an aar file, rather than the default jar maven is unable to resolve the dependency:

Failure to find com.android.support:support-v4:jar:21.0.2

This is very easy to solve however, all it takes is adding the packaging type to the dependency declaration:

<dependency>
    <groupId>com.android.support</groupId>
    <artifactId>support-v4</artifactId>
    <version>21.0.2</version>
    <type>aar</type>
    <scope>compile</scope>
</dependency>

Please consider this for the next release to Maven central. Thanks!

jpardogo commented 9 years ago

I am using https://github.com/jpardogo/gradle-mvn-push to push the lib to maven central

mstevens83 commented 9 years ago

I was afraid you were indeed using some automated tool. Do you think there is a way to add that 1 line to the pom file (possibly manually?) either before or after it goes on maven central? Thanks for considering it.

jpardogo commented 9 years ago

I have no idea how because I don't have pom.xml file.... but if you discover how I would be happy to help ;)

mstevens83 commented 9 years ago

Please consider merging my pull request above and releasing a new build (as v1.0.8 I guess?) to Maven Central. It should have the aar line in the support-v4 dependency. I will then be able to easily start using your version of the PagerSlidingTabStrip libary in my project. Thanks in advance.