"Compatibility-v4-r4.jar" is missing from Maven Repo

Over the past two days, I tried to import this library through Maven:

https://github.com/JakeWharton/Android-ViewPagerIndicator

I have to say that I am new to maven, so if this is easy to solve, please forgive me, I searched for the problem and studied the error pages, but I could not find a solution to this problem. But every time I try, I get this error:

c:\JakeWharton-Android-ViewPagerIndicator-3db7585>mvn install [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for com.viewpagerindicator:library:apklib:2.2.0 [WARNING] 'build.plugins.plugin.version' for com.jayway.maven.plugins.android.ge neration2:maven-android-plugin is missing. @ line 36, column 12 [WARNING] [WARNING] Some problems were encountered while building the effective model for com.viewpagerindicator:sample:apk:2.2.0 [WARNING] 'build.plugins.plugin.version' for com.jayway.maven.plugins.android.ge neration2:maven-android-plugin is missing. @ line 48, column 12 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten t he stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support buildin g such malformed projects. [WARNING] [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] Android-ViewPagerIndicator (Parent) [INFO] Android-ViewPagerIndicator [INFO] Android-ViewPagerIndicator Sample [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Android-ViewPagerIndicator (Parent) 2.2.0 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ parent --- [INFO] Installing c:\JakeWharton-Android-ViewPagerIndicator-3db7585\pom.xml to C :\Users\Cracksoldier\.m2\repository\com\viewpagerindicator\parent\2.2.0\parent-2 .2.0.pom [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Android-ViewPagerIndicator 2.2.0 [INFO] ------------------------------------------------------------------------ Downloading: http://r.jakewharton.com/maven/release/android/support/compatibilit y-v4/r4/compatibility-v4-r4.pom Downloading: http://repo1.maven.org/maven2/android/support/compatibility-v4/r4/c ompatibility-v4-r4.pom [WARNING] The POM for android.support:compatibility-v4:jar:r4 is missing, no dep endency information available Downloading: http://r.jakewharton.com/maven/release/android/support/compatibilit y-v4/r4/compatibility-v4-r4.jar Downloading: http://repo1.maven.org/maven2/android/support/compatibility-v4/r4/c ompatibility-v4-r4.jar [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Android-ViewPagerIndicator (Parent) ............... SUCCESS [0.204s] [INFO] Android-ViewPagerIndicator ........................ FAILURE [1.636s] [INFO] Android-ViewPagerIndicator Sample ................. SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.953s [INFO] Finished at: Thu Dec 22 18:29:20 CET 2011 [INFO] Final Memory: 10M/108M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project library: Could not resolve dependencie s for project com.viewpagerindicator:library:apklib:2.2.0: Could not find artifa ct android.support:compatibility-v4:jar:r4 in com.jakewharton (http://r.jakewhar ton.com/maven/release) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please rea d the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso lutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :library 

Throug my Issues github post I got information that I need to change compatibility from r4 to r6 in pom.xml, so I tried and changed it from:

 <android.support.version>r4</android.support.version> 

:

 <android.support.version>r6</android.support.version> 

But it didn’t work, so I went over and tried it like that. I edited the Depencies section:

  <dependency> <groupId>android.support</groupId> <artifactId>compatibility-v4</artifactId> <version>${android.support.version}</version> </dependency> 

:

  <dependency> <groupId>android.support</groupId> <artifactId>compatibility-v4-r6</artifactId> <version>${android.support.version}</version> </dependency> 

and I also tried replacing "compatible-v4" with:

Compatibility-v6 and Compatibility-r6

but nothing happened. I also checked the .m2 directory and it is not there. I also believed that Maven is installed prokornno, and this is so. Hope someone can help me.

Best wishes

+6
source share
2 answers

The way maven works is pretty simple, first download the necessary jar dependencies from the Internet to the local maven repository, when you create the application later, it will resolve all the necessary jar files from your local maven repository.

Your problem:
Maven is trying to download the jar file from http://r.jakewharton.com/maven/release/android/support/compatibility-v4/r4/ , try it yourself, this is a dead link. this usually means that the developer does not support their release of maven properly.

Sulotion:
I assume this post on GitHub is from you, you need to use maven-android-sdk-deployer , check out the How to Use section here. basically, you need to run maven-android-sdk-deployer to copy the necessary banks (which are not yet accessible via the Internet yet) from your local Android SDK directory to your local maven repository, as I said, unless you specify it explicitly , maven always resolves jar files from your local maven repository.

+3
source

Support library now available in maven public repository thanks to Manfred and Jake

http://www.simpligility.com/2012/01/android-compatibility-library-following-lint/

You just need to use a slightly different dependency specification

 <dependency> <groupId>com.google.android</groupId> <artifactId>support-v4</artifactId> <version>r6</version> </dependency> 
+10
source

Source: https://habr.com/ru/post/904340/


All Articles